Logout the user from application if refresh token is revoked

Viewed 52

If refresh tokens issued to a user in OAuth2.0 are invalidated by the admin then I want the user to be logged out from application. Can anyone provide solution for this in Spring or Java?

1 Answers

You can use spring session Management with SessionRegistry

Then you can expire the session from anywhere using something like this

sessionRegistry.getSessionInformation(sessionId).expireNow();
Related