Skip to content

Commit

Permalink
Simply if condition
Browse files Browse the repository at this point in the history
Signed-off-by: Tran Ngoc Nhan <[email protected]>
  • Loading branch information
ngocnhan-tran1996 committed Jan 29, 2025
1 parent 8373336 commit dfe5ba4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ private Map<String, String> createParameters(AuthenticationException authExcepti
if (StringUtils.hasText(error.getUri())) {
parameters.put("error_uri", error.getUri());
}
if (error instanceof BearerTokenError bearerTokenError) {
if (StringUtils.hasText(bearerTokenError.getScope())) {
parameters.put("scope", bearerTokenError.getScope());
}
if (error instanceof BearerTokenError bearerTokenError
&& StringUtils.hasText(bearerTokenError.getScope())) {
parameters.put("scope", bearerTokenError.getScope());
}
}
return parameters;
Expand Down

0 comments on commit dfe5ba4

Please sign in to comment.