Add support for back-channel logout #302
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #116
This adds functions that support back-channel logout.
With this, an implementor can evaluate
verifyLogoutToken()and if true, proceed with the developer's application-specific technique for ending the subject's session in the RP. (How that is done is left up to the developer, per the OIDC spec. In my case it involves checking server-side for an existing session based on thesidreceived in the back-channel logout token, and destroying it if found. Working great for my needs)I borrowed some of this code from an existing fork of this project, which I discovered by chance whilst browsing the 'downstream' forks. I guess it was never contributed back: https://github.com/dptsi/php-openid-connect-client/blob/master/src/OpenIDConnectClient.php#L1989-L2049
Please use this part of the spec to check the validation is correct: https://openid.net/specs/openid-connect-backchannel-1_0.html#Validation