From dac823f400e9143cfbb142343f5d9a2b0bd10479 Mon Sep 17 00:00:00 2001 From: lbw Date: Sat, 18 Jun 2022 22:31:35 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fixing=20a=20bug.=20closed=20#I5BO47=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BB=A4=E7=89=8C=E6=8A=A55XX=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/pig4cloud/pig/auth/endpoint/PigTokenEndpoint.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/endpoint/PigTokenEndpoint.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/endpoint/PigTokenEndpoint.java index 7be59074..7be42f7a 100644 --- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/endpoint/PigTokenEndpoint.java +++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/endpoint/PigTokenEndpoint.java @@ -166,6 +166,10 @@ public class PigTokenEndpoint { @DeleteMapping("/{token}") public R removeToken(@PathVariable("token") String token) { OAuth2Authorization authorization = authorizationService.findByToken(token, OAuth2TokenType.ACCESS_TOKEN); + if (authorization == null) { + return R.ok(); + } + OAuth2Authorization.Token accessToken = authorization.getAccessToken(); if (accessToken == null || StrUtil.isBlank(accessToken.getToken().getTokenValue())) { return R.ok();