updated to saml20 v1.0.1
This commit is contained in:
parent
331c3cf318
commit
4acea7c223
18
package-lock.json
generated
18
package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "mock-saml",
|
"name": "mock-saml",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mock-saml",
|
"name": "mock-saml",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@boxyhq/saml20": "1.0.0",
|
"@boxyhq/saml20": "1.0.1",
|
||||||
"next": "12.1.4",
|
"next": "12.1.4",
|
||||||
"react": "18.0.0",
|
"react": "18.0.0",
|
||||||
"react-dom": "18.0.0",
|
"react-dom": "18.0.0",
|
||||||
@ -123,9 +123,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@boxyhq/saml20": {
|
"node_modules/@boxyhq/saml20": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@boxyhq/saml20/-/saml20-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@boxyhq/saml20/-/saml20-1.0.1.tgz",
|
||||||
"integrity": "sha512-rX1sYNOffiljgTYW6Pg37cRqBHThnzI28hPY/XTb3QA7l/4z64WmgJVv5+PdJGgc962xF3o7ILknyAcw0b7bFw==",
|
"integrity": "sha512-afLhTDWE/nhNW9IV1psDoG3c5K1mLPqK0E5f2Db8jJUpos5Yzfi8zE+zjdLxSIJNAbBblG6+GXdGaT/yibCtZQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xmldom/xmldom": "0.8.2",
|
"@xmldom/xmldom": "0.8.2",
|
||||||
"crypto": "1.0.1",
|
"crypto": "1.0.1",
|
||||||
@ -3920,9 +3920,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@boxyhq/saml20": {
|
"@boxyhq/saml20": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@boxyhq/saml20/-/saml20-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@boxyhq/saml20/-/saml20-1.0.1.tgz",
|
||||||
"integrity": "sha512-rX1sYNOffiljgTYW6Pg37cRqBHThnzI28hPY/XTb3QA7l/4z64WmgJVv5+PdJGgc962xF3o7ILknyAcw0b7bFw==",
|
"integrity": "sha512-afLhTDWE/nhNW9IV1psDoG3c5K1mLPqK0E5f2Db8jJUpos5Yzfi8zE+zjdLxSIJNAbBblG6+GXdGaT/yibCtZQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@xmldom/xmldom": "0.8.2",
|
"@xmldom/xmldom": "0.8.2",
|
||||||
"crypto": "1.0.1",
|
"crypto": "1.0.1",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mock-saml",
|
"name": "mock-saml",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "Mock SAML is a free SAML 2.0 Identity Provider for testing SAML SSO integrations.",
|
"description": "Mock SAML is a free SAML 2.0 Identity Provider for testing SAML SSO integrations.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
@ -11,7 +11,7 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@boxyhq/saml20": "1.0.0",
|
"@boxyhq/saml20": "1.0.1",
|
||||||
"next": "12.1.4",
|
"next": "12.1.4",
|
||||||
"react": "18.0.0",
|
"react": "18.0.0",
|
||||||
"react-dom": "18.0.0",
|
"react-dom": "18.0.0",
|
||||||
|
|||||||
@ -33,10 +33,16 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||||||
|
|
||||||
const xmlSigned = await signResponseXML(xml, config.privateKey, config.publicKey);
|
const xmlSigned = await signResponseXML(xml, config.privateKey, config.publicKey);
|
||||||
const encodedSamlResponse = Buffer.from(xmlSigned).toString('base64');
|
const encodedSamlResponse = Buffer.from(xmlSigned).toString('base64');
|
||||||
const html = saml.createPostForm(acsUrl, relayState, {
|
const html = saml.createPostForm(acsUrl, [
|
||||||
name: 'SAMLResponse',
|
{
|
||||||
value: encodedSamlResponse,
|
name: 'RelayState',
|
||||||
});
|
value: relayState,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'SAMLResponse',
|
||||||
|
value: encodedSamlResponse,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
res.send(html);
|
res.send(html);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user