mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-05-22 17:07:12 +08:00
feat: 替换过期API
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user