BE: Add logout with query parameters to generic OAuth provider #4249
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.
The logout URL is taken from auto-detected endpoint from the provider's well known configuration address, but can be overridden by custom parameter
logout-url
. Query parameters are optional and are added only when the corresponding key is present. Default redirect URL is a base URL and can be overridden in custom parameters.Also the final slash from the redirect URL can be removed when
redirect-url-strip-slash
is set to true/yes/on/1.Example with all custom parameters:
What changes did you make? (Give an overview)
I generalized original Cognito logout code and created common ancestor. I added new OAuth logout handling, which is generic enough to handle Cognito logout too, but I kept Cognito for simplicity of
configuration.
Is there anything you'd like reviewers to focus on?
I changed the calculation of redirect URL after logout to have the context path. For normal installation there is no change in behaviour (context path is root - "/").
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)