Allow authn request without relayState if relayState is empty#82
Conversation
|
I think is an acceptable behavior, but let me review rest of the toolkits and also review how this affect to the signature process before merge. (also we should extend that for the LogoutRequest). |
|
Alright, thanks for the feedback @pitbulk . I've changed the logout method so that it uses the same behavior. |
cc94aba to
84df311
Compare
|
@pitbulk anything left to be done here before merging? |
|
No sorry, I was on vacation mode. I will review it again in a couple of hours and merge it. |
|
No worries, thanks! |
|
If we don't add a GET['RelayState'] parameter if relayState var is empty, we should update the buildSignature method, and don't calculate the signature based on the relayState. currently we only check that is not null The specs says: @ThePetrov can you fix that? |
|
@ThePetrov any chance to update the PR with my suggestions and rebase? |
- add handling for empty relayState - add test for login and SLO without relayState - extend Javadocs with information about the new behavior - change signature building for empty relaystate
84df311 to
e0eeb43
Compare
|
@pitbulk - sorry for the delay, I updated the signature building and added tests for it |
Currently it's not possible to have an authn request without a relayState. When a null relayState is provided, then a self routed URL is used instead. If an empty string is provided, then relayState is appended as a query parameter without value. A request without a relayState is a valid case and relayState without value does not work ie in ADFS (it results in an MSIS7000 error).
To mitigate this without changing the API too much I've changed login to treat an empty returnTo (relayState) parameter as no relay state. A null returnTo will still result in a self routed URL. I also added a test case for this scenario and extended the Javadocs to inform about the behavior.