Skip to content

Commit

Permalink
hotfix authNrequest ID format
Browse files Browse the repository at this point in the history
  • Loading branch information
AleDore committed Jan 5, 2023
1 parent e052c2e commit 630ad26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/strategy/__tests__/saml_client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ describe("CustomSamlClient#generateAuthorizeRequest", () => {
);
const jwkThumbprint = await jose.calculateJwkThumbprint(aJwkPubKey);
const lollipopSamlRequest = samlRequestWithID(
`${DEFAULT_LOLLIPOP_HASH_ALGORITHM}:${jwkThumbprint}`
`${DEFAULT_LOLLIPOP_HASH_ALGORITHM}-${jwkThumbprint}`
);
mockWrapCallback.mockImplementation(callback => {
callback(null, samlRequest);
Expand Down Expand Up @@ -443,7 +443,7 @@ describe("CustomSamlClient#generateAuthorizeRequest", () => {
setTimeout(() => {
expect(mockSet).toBeCalled();
expect(mockCallback).toBeCalledWith(null, expectedSamlRequest);
expect(`${DEFAULT_LOLLIPOP_HASH_ALGORITHM}:${jwkThumbprint}`).toEqual(
expect(`${DEFAULT_LOLLIPOP_HASH_ALGORITHM}-${jwkThumbprint}`).toEqual(
expectedSamlRequestXML["samlp:AuthnRequest"].$.ID
);
resolve(undefined);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/samlUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe("getAuthorizeRequestTamperer", () => {
DEFAULT_LOLLIPOP_HASH_ALGORITHM
);
expect(authnRequest.$.ID).toEqual(
`${DEFAULT_LOLLIPOP_HASH_ALGORITHM}:${thumbprint}`
`${DEFAULT_LOLLIPOP_HASH_ALGORITHM}-${thumbprint}`
);
expect(
authnRequest["samlp:NameIDPolicy"][0].$.AllowCreate
Expand Down
2 changes: 1 addition & 1 deletion src/utils/samlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ export const getAuthorizeRequestTamperer = (
),
TE.map(
({ hashingAlgo, jwkThumbprint }) =>
`${hashingAlgo}:${jwkThumbprint}`
`${hashingAlgo}-${jwkThumbprint}`
),
TE.chain(requestId =>
TE.tryCatch(async () => {
Expand Down

0 comments on commit 630ad26

Please sign in to comment.