@boxyhq/saml-jackson 0.1.5-beta.93 → 0.1.5
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/package.json +1 -1
- package/src/saml/saml.js +3 -15
package/package.json
CHANGED
package/src/saml/saml.js
CHANGED
@@ -141,20 +141,12 @@ module.exports = {
|
|
141
141
|
let X509Certificate = null;
|
142
142
|
let ssoPostUrl = null;
|
143
143
|
let ssoRedirectUrl = null;
|
144
|
-
let loginType = 'idp';
|
145
144
|
|
146
|
-
|
147
|
-
|
145
|
+
const ssoDes = rambda.pathOr(
|
146
|
+
[],
|
148
147
|
'EntityDescriptor.IDPSSODescriptor',
|
149
148
|
res
|
150
149
|
);
|
151
|
-
if (!ssoDes) {
|
152
|
-
ssoDes = rambda.pathOr([], 'EntityDescriptor.SPSSODescriptor', res);
|
153
|
-
if (!ssoDes) {
|
154
|
-
loginType = 'sp';
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
150
|
for (const ssoDesRec of ssoDes) {
|
159
151
|
const keyDes = ssoDesRec['KeyDescriptor'];
|
160
152
|
for (const keyDesRec of keyDes) {
|
@@ -165,10 +157,7 @@ module.exports = {
|
|
165
157
|
}
|
166
158
|
}
|
167
159
|
|
168
|
-
const ssoSvc =
|
169
|
-
ssoDesRec['SingleSignOnService'] ||
|
170
|
-
ssoDesRec['AssertionConsumerService'] ||
|
171
|
-
[];
|
160
|
+
const ssoSvc = ssoDesRec['SingleSignOnService'] || [];
|
172
161
|
for (const ssoSvcRec of ssoSvc) {
|
173
162
|
if (
|
174
163
|
rambda.pathOr('', '$.Binding', ssoSvcRec).endsWith('HTTP-POST')
|
@@ -199,7 +188,6 @@ module.exports = {
|
|
199
188
|
if (ssoRedirectUrl) {
|
200
189
|
ret.sso.redirectUrl = ssoRedirectUrl;
|
201
190
|
}
|
202
|
-
ret.loginType = loginType;
|
203
191
|
|
204
192
|
resolve(ret);
|
205
193
|
}
|