Skip to content

Commit 39d3648

Browse files
authored
Merge pull request #316 from mauromol/clarify-relaystate-parameter
Clarify the real nature of the RelayState parameter for SSO and SLO
2 parents 1d7e103 + ecb21f6 commit 39d3648

File tree

2 files changed

+232
-101
lines changed

2 files changed

+232
-101
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,10 @@ The AuthNRequest will be sent signed or unsigned based on the security settings
440440

441441
The IdP will then return the SAML Response to the user's client. The client is then forwarded to the Attribute Consumer Service of the SP with this information.
442442

443-
We can set a 'returnTo' url parameter to the login function and that will be converted as a 'RelayState' parameter:
443+
We can set a 'RelayState' parameter containing a return url to the login function:
444444
```
445-
String targetUrl = 'https://example.com';
446-
auth.login(returnTo=targetUrl)
445+
String returnUrl = 'https://example.com';
446+
auth.login(relayState=returnUrl)
447447
```
448448
The login method can receive 6 more optional parameters:
449449
- *forceAuthn* When true the AuthNRequest will have the 'ForceAuthn' attribute set to 'true'
@@ -612,10 +612,10 @@ The Logout Request will be sent signed or unsigned based on the security setting
612612

613613
The IdP will return the Logout Response through the user's client to the Single Logout Service of the SP.
614614

615-
We can set a 'returnTo' url parameter to the logout function and that will be converted as a 'RelayState' parameter:
615+
We can set a 'RelayState' parameter containing a return url to the login function:
616616
```
617-
String targetUrl = 'https://example.com';
618-
auth.logout(returnTo=targetUrl)
617+
String returnUrl = 'https://example.com';
618+
auth.logout(relayState=returnUrl)
619619
```
620620

621621
Also there are 7 optional parameters that can be set:

0 commit comments

Comments
 (0)