I am implementing OAuth2 for my REST service (password type) using the Spring Security Module. I am using postgreSQL as my Token Store. Everything works fine, but I need to add the ability to change the user password. If the user changes his password, the old token must be deleted / forgotten.
I implement this function using the JdbcTokenStore Spring service:
public void updatePassword(User user, String newPassword) { ...
Is this approach right? Is there any standard way to deal with such situations?
IgorekPotworek
source share