samlesa 2.14.8 → 2.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Welcome contributions or integration examples with frameworks
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
43
|
## 安装 / Installation
|
|
44
|
-
|
|
44
|
+
您应该在使用的前提下首先设置验证其
|
|
45
45
|
```js
|
|
46
46
|
|
|
47
47
|
import * as validator from '@authenio/samlify-xsd-schema-validator';
|
|
@@ -81,7 +81,7 @@ if (request.method === 'POST') {
|
|
|
81
81
|
infoQuery.body = request.body
|
|
82
82
|
dataResult = Extractor.extract(Base64.decode(decodeURIComponent(data.SAMLResponse)), loginResponseFields)
|
|
83
83
|
}
|
|
84
|
-
/**
|
|
84
|
+
/** 您应该自行实施根据响应提取出来的Issur去数据库查找元数据*/
|
|
85
85
|
// 1. 提取SAML发行者信息
|
|
86
86
|
if (!dataResult.issuer) {
|
|
87
87
|
return reply.view('errorHtml.html', {
|
|
@@ -106,9 +106,11 @@ if(upaboveFieldCheckAllSuccess){
|
|
|
106
106
|
return repla.view('success.ejs',{...your template data})
|
|
107
107
|
}
|
|
108
108
|
/*success.ejs template example */
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```html
|
|
113
|
+
<!-- 实例用于提交post 请求隐藏的表单 -->
|
|
112
114
|
<form id="saml-form" method="post" action="<%= entityEndpoint %>" style="display: none;">
|
|
113
115
|
<input type="hidden" name="<%= type %>" value="<%= context %>" />
|
|
114
116
|
<input type="hidden" name="RelayState" value="<%= relayState %>" />
|
|
@@ -124,6 +126,5 @@ if(upaboveFieldCheckAllSuccess){
|
|
|
124
126
|
document.querySelector('.loading-subtext').textContent =
|
|
125
127
|
'跳转时间较长,请检查网络或联系系统管理员';
|
|
126
128
|
}, 1500);
|
|
127
|
-
</script
|
|
128
|
-
|
|
129
|
+
</script>
|
|
129
130
|
```
|