sso
This commit is contained in:
parent
029fe23657
commit
1876580d86
911 changed files with 160008 additions and 2 deletions
41
node_modules/passport-saml/lib/node-saml/algorithms.js
generated
vendored
Normal file
41
node_modules/passport-saml/lib/node-saml/algorithms.js
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getSigner = exports.getDigestAlgorithm = exports.getSigningAlgorithm = void 0;
|
||||
const crypto = require("crypto");
|
||||
function getSigningAlgorithm(shortName) {
|
||||
switch (shortName) {
|
||||
case "sha256":
|
||||
return "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";
|
||||
case "sha512":
|
||||
return "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";
|
||||
case "sha1":
|
||||
default:
|
||||
return "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
|
||||
}
|
||||
}
|
||||
exports.getSigningAlgorithm = getSigningAlgorithm;
|
||||
function getDigestAlgorithm(shortName) {
|
||||
switch (shortName) {
|
||||
case "sha256":
|
||||
return "http://www.w3.org/2001/04/xmlenc#sha256";
|
||||
case "sha512":
|
||||
return "http://www.w3.org/2001/04/xmlenc#sha512";
|
||||
case "sha1":
|
||||
default:
|
||||
return "http://www.w3.org/2000/09/xmldsig#sha1";
|
||||
}
|
||||
}
|
||||
exports.getDigestAlgorithm = getDigestAlgorithm;
|
||||
function getSigner(shortName) {
|
||||
switch (shortName) {
|
||||
case "sha256":
|
||||
return crypto.createSign("RSA-SHA256");
|
||||
case "sha512":
|
||||
return crypto.createSign("RSA-SHA512");
|
||||
case "sha1":
|
||||
default:
|
||||
return crypto.createSign("RSA-SHA1");
|
||||
}
|
||||
}
|
||||
exports.getSigner = getSigner;
|
||||
//# sourceMappingURL=algorithms.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue