feat: 替换过期API

This commit is contained in:
zhouhao
2023-06-28 15:50:23 +08:00
parent f507867d5b
commit c5fd2faad7
9 changed files with 15 additions and 13 deletions

View File

@@ -48,7 +48,7 @@ public class ReactiveUserTokenController {
@Operation(summary = "重置当前用户的令牌")
public Mono<Boolean> resetToken() {
return Mono
.<ParsedToken>deferWithContext(ctx -> Mono.justOrEmpty(ctx.getOrEmpty(ParsedToken.class)))
.<ParsedToken>deferContextual(ctx -> Mono.justOrEmpty(ctx.getOrEmpty(ParsedToken.class)))
.flatMap(token -> userTokenManager.signOutByToken(token.getToken()))
.thenReturn(true);
}