SAML Metadata URL配置读取

This commit is contained in:
Crystal.Sea
2020-11-27 08:11:35 +08:00
parent 16cba997e8
commit 2f936c80dd
11 changed files with 1069 additions and 94 deletions

View File

@@ -361,15 +361,16 @@ apps.saml.fileType=\u8bc1\u4e66\u7c7b\u578b
apps.saml.nameIdConvert=NameId Convert
apps.saml.target=\u76ee\u6807\u5730\u5740
apps.saml.metadata.telephoneNumber=\u7535\u8bdd\u53f7\u7801
apps.saml.fileType.metadata=SAML\u5143\u6570\u636e
apps.saml.fileType.metadata.file=SAML\u5143\u6570\u636e\u6587\u4ef6
apps.saml.fileType.metadata.url=SAML\u5143\u6570\u636e\u5730\u5740
apps.saml.fileType.certificate=\u8bc1\u4e66
apps.saml.metaFile=SAML\u5143\u6570\u636e
apps.saml.metadata.givenName=\u540d
apps.saml.issuer=Issuer
apps.saml.nameIdConvert.upperCase=\u5927\u5199
apps.saml.metadata.orgURL=\u7ec4\u7ec7\u7ad9\u70b9
apps.saml.metadata.info=SAML V2.0 \u5143\u6570\u636e\u914d\u7f6e
apps.saml.certSubject=\u8bc1\u4e66\u4e3b\u9898
apps.saml.certMetaFile=\u8bc1\u4e66\u6587\u4ef6
apps.saml.encrypted.no=\u4e0d\u52a0\u5bc6
apps.saml.binding=Binding
apps.saml.metadata.surName=\u59d3

View File

@@ -360,15 +360,16 @@ apps.saml.fileType=fileType
apps.saml.nameIdConvert=NameId Convert
apps.saml.target=target
apps.saml.metadata.telephoneNumber=telephoneNumber
apps.saml.fileType.metadata=SAML Metadata Type
apps.saml.fileType.metadata.file=SAML Metadata File
apps.saml.fileType.metadata.url=SAML Metadata Url
apps.saml.fileType.certificate=Certificate
apps.saml.metaFile=Metadata
apps.saml.metadata.givenName=givenName
apps.saml.issuer=Issuer
apps.saml.nameIdConvert.upperCase=upperCase
apps.saml.metadata.orgURL=orgURL
apps.saml.metadata.info=SAML V2.0 Info
apps.saml.certSubject=certSubject
apps.saml.certMetaFile=certMetaFile
apps.saml.encrypted.no=No encrypted
apps.saml.binding=Binding
apps.saml.metadata.surName=surName

View File

@@ -362,15 +362,16 @@ apps.saml.fileType=\u8bc1\u4e66\u7c7b\u578b
apps.saml.nameIdConvert=NameId Convert
apps.saml.target=\u76ee\u6807\u5730\u5740
apps.saml.metadata.telephoneNumber=\u7535\u8bdd\u53f7\u7801
apps.saml.fileType.metadata=SAML\u5143\u6570\u636e
apps.saml.fileType.metadata.file=SAML\u5143\u6570\u636e\u6587\u4ef6
apps.saml.fileType.metadata.url=SAML\u5143\u6570\u636e\u5730\u5740
apps.saml.fileType.certificate=\u8bc1\u4e66
apps.saml.metaFile=SAML\u5143\u6570\u636e
apps.saml.metadata.givenName=\u540d
apps.saml.issuer=Issuer
apps.saml.nameIdConvert.upperCase=\u5927\u5199
apps.saml.metadata.orgURL=\u7ec4\u7ec7\u7ad9\u70b9
apps.saml.metadata.info=SAML V2.0 \u5143\u6570\u636e\u914d\u7f6e
apps.saml.certSubject=\u8bc1\u4e66\u4e3b\u9898
apps.saml.certMetaFile=\u8bc1\u4e66\u6587\u4ef6
apps.saml.encrypted.no=\u4e0d\u52a0\u5bc6
apps.saml.binding=Binding
apps.saml.metadata.surName=\u59d3

View File

@@ -4,6 +4,22 @@
<#include "../../layout/header.ftl"/>
<#include "../../layout/common.cssjs.ftl"/>
<#include "../appCommonHead.ftl"/>
<script type="text/javascript">
<!--
$(function(){
$("#fileType").change(function(){
if($("#fileType").val() !="metadata_url"){
$(".MetaFile").show();
$(".MetaUrl").hide();
}else{
$(".MetaFile").hide();
$(".MetaUrl").show();
}
});
});
//-->
</script>
</head>
<body>
<form id="actionForm_app" method="post" type="label" autoclose="true" closeWindow="true"
@@ -29,23 +45,23 @@
<tr>
<th><@locale code="apps.saml.spAcsUrl" /></th>
<td colspan =3>
<input type="text" class="form-control" id="spAcsUrl" name="spAcsUrl" title="" value="" required="" />
<input type="text" class="form-control" id="spAcsUrl" name="spAcsUrl" title="" value="" />
</td>
</tr>
<tr>
<th><@locale code="apps.saml.entityId" /></th>
<td colspan =3>
<input type="text" class="form-control" id="entityId" name="entityId" title="" value="" required="" />
<input type="text" class="form-control" id="entityId" name="entityId" title="" value="" />
</td>
</tr>
<tr>
<th><@locale code="apps.saml.issuer" /></th>
<td>
<input type="text" class="form-control" id="issuer" name="issuer" title="" value="" required="" />
<input type="text" class="form-control" id="issuer" name="issuer" title="" value="" />
</td>
<th><@locale code="apps.saml.audience" /></th>
<td >
<input type="text" class="form-control" id="audience" name="audience" title="" value="" required="" />
<input type="text" class="form-control" id="audience" name="audience" title="" value="" />
</td>
</tr>
<tr>
@@ -137,19 +153,20 @@
<td>
<select id="fileType" name="fileType" class="form-control" >
<option value="certificate"><@locale code="apps.saml.fileType.certificate" /></option>
<option value="metadata" selected><@locale code="apps.saml.fileType.metadata" /></option>
<option value="metadata_file" selected><@locale code="apps.saml.fileType.metadata.file" /></option>
<option value="metadata_url" ><@locale code="apps.saml.fileType.metadata.url" /></option>
</select>
<b class="orange">*</b><label for="fileType"></label>
</td>
<th><@locale code="apps.saml.certMetaFile" /></th>
<th><@locale code="apps.saml.metaFile" /></th>
<td nowrap >
<div style="float: left;">
<img id="certMetaFileImg" height="40" width="80" alt="upload certificate or metadata file" src="<@base />/static/images/cert.png">
<div class="MetaFile" style="float: left;">
<img id="metaFileImg" height="40" width="80" alt="upload certificate or metadata file" src="<@base />/static/images/cert.png">
</div>
<div style="float: left; width: 250px;">
<input class="form-control" id="certMetaFile" type="file" name="certMetaFile" />
<b class="orange">*</b><label for="certMetaFile"></label>
<div class="MetaFile" style="float: left; width: 250px;">
<input class="form-control" id="metaFile" type="file" name="metaFile" />
</div>
<input type="text" style="display:none" class="form-control MetaUrl" id="metaUrl" name="metaUrl" title="" value="" />
</td>
</tr>

View File

@@ -7,14 +7,16 @@
<#setting number_format="#">
<script type="text/javascript">
<!--
$(function(){
$("#certMetaFileImg").on("click",function(){
if(!$("#certMetaFileImg").hasClass("appended")){
$("#certMetaFileImg").after('<input id="certMetaFile" type="file" name="certMetaFile" />');
$("#certMetaFileImg").addClass("appended");
$(function(){
$("#fileType").change(function(){
if($("#fileType").val() !="metadata_url"){
$(".MetaFile").show();
$(".MetaUrl").hide();
}else{
$(".MetaFile").hide();
$(".MetaUrl").show();
}
});
});
});
//-->
</script>
@@ -43,13 +45,13 @@
<tr>
<th><@locale code="apps.saml.spAcsUrl" /></th>
<td colspan =3>
<input type="text" class="form-control" id="spAcsUrl" name="spAcsUrl" title="" value="${model.spAcsUrl!}" required="" />
<input type="text" class="form-control" id="spAcsUrl" name="spAcsUrl" title="" value="${model.spAcsUrl!}" />
</td>
</tr>
<tr>
<th><@locale code="apps.saml.entityId" /></th>
<td >
<input type="text" class="form-control" id="entityId" name="entityId" title="" value="${model.entityId!}" required="" />
<input type="text" class="form-control" id="entityId" name="entityId" title="" value="${model.entityId!}" />
</td>
<td></td>
<td >
@@ -59,11 +61,11 @@
<tr>
<th><@locale code="apps.saml.issuer" /></th>
<td >
<input type="text" class="form-control" id="issuer" name="issuer" title="" value="${model.issuer!}" required="" />
<input type="text" class="form-control" id="issuer" name="issuer" title="" value="${model.issuer!}" />
</td>
<th><@locale code="apps.saml.audience" /></th>
<td colspan =2>
<input type="text" class="form-control" id="audience" name="audience" title="" value="${model.audience!}" required="" />
<input type="text" class="form-control" id="audience" name="audience" title="" value="${model.audience!}" />
</td>
</tr>
<tr>
@@ -152,13 +154,19 @@
<td>
<select id="fileType" name="fileType" class="form-control" >
<option value="certificate" selected><@locale code="apps.saml.fileType.certificate" /></option>
<option value="metadata"><@locale code="apps.saml.fileType.metadata" /></option>
<option value="metadata_file"><@locale code="apps.saml.fileType.metadata.file" /></option>
<option value="metadata_url" ><@locale code="apps.saml.fileType.metadata.url" /></option>
</select>
</td>
<th><@locale code="apps.saml.certMetaFile" /></th>
<th><@locale code="apps.saml.metaFile" /></th>
<td>
<img id="certMetaFileImg" height="40" width="80" alt="upload certificate or metadata file" src="<@base />/static/images/cert.png">
<b class="orange">*</b><label for="certMetaFile"></label>
<div class="MetaFile" style="float: left;">
<img id="metaFileImg" height="40" width="80" alt="upload certificate or metadata file" src="<@base />/static/images/cert.png">
</div>
<div class="MetaFile" style="float: left; width: 250px;">
<input class="form-control" id="metaFile" type="file" name="metaFile" />
</div>
<input type="text" style="display:none" class="form-control MetaUrl" id="metaUrl" name="metaUrl" title="" value="${model.metaUrl!}" />
</td>
</tr>