🎨 Improving structure / format of the code.

This commit is contained in:
lbw 2022-10-24 08:36:05 +08:00
parent 65e67c0e70
commit 646fbfee5b

View File

@ -146,7 +146,7 @@ public class PigTokenEndpoint {
httpResponse.setStatusCode(HttpStatus.UNAUTHORIZED);
this.authenticationFailureHandler.onAuthenticationFailure(request, response,
new InvalidBearerTokenException(OAuth2ErrorCodesExpand.TOKEN_MISSING));
return;
return;
}
OAuth2Authorization authorization = authorizationService.findByToken(token, OAuth2TokenType.ACCESS_TOKEN);
@ -154,7 +154,7 @@ public class PigTokenEndpoint {
if (authorization == null || authorization.getAccessToken() == null) {
this.authenticationFailureHandler.onAuthenticationFailure(request, response,
new InvalidBearerTokenException(OAuth2ErrorCodesExpand.INVALID_BEARER_TOKEN));
return;
return;
}
Map<String, Object> claims = authorization.getAccessToken().getClaims();