Skip to content

Commit

Permalink
fix for allowing non-gui authorization for reset password flow
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Sep 29, 2023
1 parent 14f87df commit 6da3b6a
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ public String getPathAfterSuccessfulAuthentication() {

@Override
public boolean isAllowedAuthorization(Authorization autz) {
if (autz != null
&& autz.getAction().contains(AuthorizationConstants.AUTZ_UI_RESET_PASSWORD_URL)) {
if (autz == null) {
return false;
}
if (autz.getAction().contains(AuthorizationConstants.AUTZ_UI_RESET_PASSWORD_URL)) {
return true;
}

if(!autz.getAction().stream().anyMatch(action -> action.contains(AuthorizationConstants.NS_AUTHORIZATION_UI))) {
return true;
}

return false;
}

Expand Down

0 comments on commit 6da3b6a

Please sign in to comment.