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

Fixes #287 - Add LogoutEventListener #302

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

Jayfrown
Copy link
Contributor

@Jayfrown Jayfrown commented Feb 5, 2022

This commit introduces a LogoutEventListener which invalidates the given refresh_token and unsets the cookie, if enabled.

If no refresh token is supplied, an error is returned and the cookie remains untouched. If the supplied refresh token is (already) invalid, the cookie is unset.

Because the LogoutEventListener always sets a response, it would inhibit normal logout behavior and therefore should only run on a specifically configured firewall.

Therefore a new configuration option is introduced, called logout_firewall, which contains the name of the firewall that triggers the logout event we want to hook into (default: api).

@Jayfrown
Copy link
Contributor Author

@mbabker If you have the time, would you mind reviewing this PR? Maybe we can spot and fix some issues before @markitosgv has the time to take a look at it.

This commit introduces a `LogoutEventListener` which invalidates the
given `refresh_token` and unsets the cookie, if enabled.

If no refresh token is supplied, an error is returned and the cookie
remains untouched. If the supplied refresh token is (already) invalid,
the cookie is unset.

Because the `LogoutEventListener` always sets a response, it would
inhibit normal logout behavior and therefore should only run on a
specifically configured firewall.

Therefore a new configuration option is introduced, called
`logout_firewall`, which contains the name of the firewall that
triggers the logout event we want to hook into (default: `api`).
@markitosgv markitosgv merged commit a3d3167 into markitosgv:master Apr 7, 2022
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.

None yet

3 participants