Merge pull request #22824 from overleaf/jel-saml-tests

[web] SAML test helper update

GitOrigin-RevId: 6a721901b0026286e0ef28ed9168c8b97cd4a200
This commit is contained in:
Jessica Lawshe
2025-01-16 09:06:33 +00:00
committed by Copybot
parent 6d3088ca2a
commit ac526b83c8
@@ -57,7 +57,9 @@ function createMockSamlAssertion(samlData = {}, opts = {}) {
const { signedAssertion = true } = opts
const userIdAttributeName = samlData.userIdAttribute || 'uniqueId'
const userIdAttribute = `<saml:AttributeStatement>
const userIdAttribute =
uniqueId &&
`<saml:AttributeStatement>
<saml:Attribute Name="${userIdAttributeName}" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">${uniqueId}</saml:AttributeValue>
</saml:Attribute>