From 5f0d985ad83a933d2a714d15bf28050027f1ac0e Mon Sep 17 00:00:00 2001 From: rjohnsonbade <73083832+rjohnsonbade@users.noreply.github.com> Date: Wed, 2 Aug 2023 03:22:43 +1000 Subject: [PATCH] Add SubjectConfirmationData to response (#218) - Using bearer method Co-authored-by: Russell Johnson-Bade --- utils/response.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/response.ts b/utils/response.ts index 0e1a27f..323dcf7 100644 --- a/utils/response.ts +++ b/utils/response.ts @@ -108,6 +108,14 @@ const createResponseXML = async (params: { '@Format': 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', '#text': user.email, }, + 'saml:SubjectConfirmation': { + '@Method': 'urn:oasis:names:tc:SAML:2.0:cm:bearer', + 'saml:SubjectConfirmationData': { + '@InResponseTo': inResponseTo, + '@NotOnOrAfter': notAfter, + '@Recipient': acsUrl, + }, + }, }, 'saml:Conditions': { '@NotBefore': notBefore,