简体   繁体   中英

Spring OAuth2 Refresh token expiration

I am wondering if my refresh token validity <property name="refreshTokenValiditySeconds" value="6000" /> expires, does spring automatically removes it from DB calling TokenStore method void removeRefreshToken(OAuth2RefreshToken var1); Or it is handled differently after expiration ?

Spring does not expire the refresh token automatically. Your TokenStore implementation has to take care of that. For example a Redis backed token store can expire token key-value pairs autonomously if the key expiry is is set.

removeRefreshToken(..) is for explicitly removing stored refresh tokens.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM