Skip to content

How to intercept identity provider back-channel logout calls to BFF internal logout uri ? #242

Answered by ch4mpy
sisco70 asked this question in Q&A
Discussion options

You must be logged in to vote

even if the session expires

This looks like the key point: what you are ultimately interested in are session events. Logout events are just one of the possible causes for sessions being destroyed.

If working with a single instance BFF, the servlet version of Spring Cloud Gateway can greatly help because you could listen to the container's SessionDestroyedEvent using a Spring ApplicationListener.

If working with a clustered BFF, you should also look into Spring Session project. When the gateway is distributed for scalability or high availability, so should its sessions. As a session deletion event should be emitted only once for the cluster and not once per instance (or replica, pod, or …

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@sisco70
Comment options

Comment options

You must be logged in to vote
6 replies
@ch4mpy
Comment options

@sisco70
Comment options

@ch4mpy
Comment options

@sisco70
Comment options

@ch4mpy
Comment options

Answer selected by sisco70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants