Skip to content

Commit

Permalink
ELY-2688 Merge an if statement with the enclosing one
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielpadilh4 committed Oct 18, 2023
1 parent 955b5a6 commit 366047b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ public RequestAuthenticator(OidcHttpFacade facade, OidcClientConfiguration deplo

public AuthOutcome authenticate() {
AuthOutcome authenticate = doAuthenticate();
if (AuthOutcome.AUTHENTICATED.equals(authenticate)) {
if (! facade.isAuthorized()) {
return AuthOutcome.FAILED;
}
if (AuthOutcome.AUTHENTICATED.equals(authenticate) && !facade.isAuthorized()) {
return AuthOutcome.FAILED;
}
return authenticate;
}
Expand Down

0 comments on commit 366047b

Please sign in to comment.