use saml req id
This commit is contained in:
parent
679cd0ee58
commit
e68b437a85
@ -28,6 +28,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||||||
idpIdentityId: config.entityId,
|
idpIdentityId: config.entityId,
|
||||||
audience: req.body.audience,
|
audience: req.body.audience,
|
||||||
acsUrl: req.body.acsUrl,
|
acsUrl: req.body.acsUrl,
|
||||||
|
samlReqId: req.body.id,
|
||||||
user: user,
|
user: user,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -8,9 +8,10 @@ const createResponseXML = async (params: {
|
|||||||
idpIdentityId: string;
|
idpIdentityId: string;
|
||||||
audience: string;
|
audience: string;
|
||||||
acsUrl: string;
|
acsUrl: string;
|
||||||
|
samlReqId: string;
|
||||||
user: User;
|
user: User;
|
||||||
}): Promise<string> => {
|
}): Promise<string> => {
|
||||||
const { idpIdentityId, audience, acsUrl, user } = params;
|
const { idpIdentityId, audience, acsUrl, user, samlReqId } = params;
|
||||||
|
|
||||||
const authDate = new Date();
|
const authDate = new Date();
|
||||||
const authTimestamp = authDate.toISOString();
|
const authTimestamp = authDate.toISOString();
|
||||||
@ -21,7 +22,7 @@ const createResponseXML = async (params: {
|
|||||||
authDate.setMinutes(authDate.getMinutes() + 10);
|
authDate.setMinutes(authDate.getMinutes() + 10);
|
||||||
const notAfter = authDate.toISOString();
|
const notAfter = authDate.toISOString();
|
||||||
|
|
||||||
const inResponseTo = '_1234';
|
const inResponseTo = samlReqId;
|
||||||
// const responseId = crypto.randomBytes(10).toString('hex');
|
// const responseId = crypto.randomBytes(10).toString('hex');
|
||||||
|
|
||||||
const attributeStatement = {
|
const attributeStatement = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user