Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #10 pass RelayState down to additionalParams #11

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

fautore
Copy link
Contributor

@fautore fautore commented Sep 5, 2024

fix issue #10.
The main idea is to enable the ability for the user to pass RelayState when building the strategy:

// configuration code ...
    saml: {
      authnRequestBinding: 'HTTP-POST', // or HTTP-Redirect
      attributeConsumingServiceIndex: '0', // index of 'acs' array
      signatureAlgorithm: 'sha256',
      digestAlgorithm: 'sha256',
      callbackUrl: spCallbackUrl,
      logoutCallbackUrl: spLogoutCallbackUrl,
      racComparison: 'minimum',
      privateKey,
      audience: sp,
      additionalParams: { // pass relaystate to additionalParams
        RelayState: 'send test relay state'
      }
    },
// configuration code ...

and then access it via:

console.log(req.body.RelayState); 
// OUTPUT:
// send test relay state

if no RelayState is provided, the default is used.
I ran the tests, all checks pass,
thank you.

@random42 random42 closed this Sep 5, 2024
@random42 random42 reopened this Sep 5, 2024
@random42
Copy link
Owner

random42 commented Sep 5, 2024

LGTM

@random42 random42 merged commit d99f4be into random42:main Sep 5, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants