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

Added RelayState to response #3

Closed
wants to merge 0 commits into from

Conversation

neilherbertuk
Copy link
Contributor

As per SAML Spec, if RelayState is given, this must be passed back to the SP as is.

As Per official SAML docs (http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html):
5.1.1

a binding-specific field called RelayState is used to coordinate messages and actions of IdPs and SPs, for example, to allow an IdP (with which SSO was initiated) to indicate the URL of a desired resource when communicating with an SP.

5.1.2.5

If the IdP received a RelayState value from the SP, it must return it unmodified to the SP in a hidden form control named RelayState. The Single Sign-On Service sends the HTML form back to the browser in the HTTP response.

RelayState can be used by SP to pass back after login the intended URL among other things such as tokens.

Not sure if storing this in session is the best approach but works well.

@steve-ks
Copy link
Contributor

steve-ks commented Nov 3, 2017

Thanks for your contribution,
I will test your code soon and would merge it then.

@neilherbertuk
Copy link
Contributor Author

Removed pull request as I have a few other changes I would like to push in and need this to be somewhere else.

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