mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-31 08:14:18 +08:00
🐛 Fixing a bug. closed #I5BO47 删除令牌报5XX错误
This commit is contained in:
parent
72337a7a13
commit
dac823f400
@ -166,6 +166,10 @@ public class PigTokenEndpoint {
|
||||
@DeleteMapping("/{token}")
|
||||
public R<Boolean> removeToken(@PathVariable("token") String token) {
|
||||
OAuth2Authorization authorization = authorizationService.findByToken(token, OAuth2TokenType.ACCESS_TOKEN);
|
||||
if (authorization == null) {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
OAuth2Authorization.Token<OAuth2AccessToken> accessToken = authorization.getAccessToken();
|
||||
if (accessToken == null || StrUtil.isBlank(accessToken.getToken().getTokenValue())) {
|
||||
return R.ok();
|
||||
|
Loading…
Reference in New Issue
Block a user