@@ -202,11 +202,9 @@ public class RedisUserTokenManager implements UserTokenManager {
return getByToken(token)
.flatMap(userToken -> {
if (userToken.getMaxInactiveInterval() > 0) {
- return userTokenStore
+ return operations
- .increment(getTokenRedisKey(token), token, 1L)
+ .expire(getTokenRedisKey(token), Duration.ofMillis(userToken.getMaxInactiveInterval()))
- .then(operations
+ .then();
- .expire(getTokenRedisKey(token), Duration.ofMillis(userToken.getMaxInactiveInterval()))
- .then());
}
return Mono.empty();
});
@@ -125,8 +125,8 @@ public class RedisUserTokenManagerTest {
tokenManager.touch("test-token_2")
.as(StepVerifier::create)
- .expectFusion()
+ .expectComplete()
- .verifyComplete();
+ .verify();
Thread.sleep(2000);
tokenManager.getByToken("test-token_2")