sso
This commit is contained in:
parent
029fe23657
commit
1876580d86
911 changed files with 160008 additions and 2 deletions
19
node_modules/passport-saml/lib/node-saml/utility.js
generated
vendored
Normal file
19
node_modules/passport-saml/lib/node-saml/utility.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.signXmlResponse = exports.assertRequired = void 0;
|
||||
const xml_1 = require("./xml");
|
||||
function assertRequired(value, error) {
|
||||
if (value === undefined || value === null || (typeof value === "string" && value.length === 0)) {
|
||||
throw new TypeError(error !== null && error !== void 0 ? error : "value does not exist");
|
||||
}
|
||||
else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
exports.assertRequired = assertRequired;
|
||||
function signXmlResponse(samlMessage, options) {
|
||||
const responseXpath = '//*[local-name(.)="Response" and namespace-uri(.)="urn:oasis:names:tc:SAML:2.0:protocol"]';
|
||||
return xml_1.signXml(samlMessage, responseXpath, { reference: responseXpath, action: "append" }, options);
|
||||
}
|
||||
exports.signXmlResponse = signXmlResponse;
|
||||
//# sourceMappingURL=utility.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue