Skip to content

Commit

Permalink
fix org name comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Jul 18, 2023
1 parent 8d241b5 commit 9a4b682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/auth0/utils/tokens/IdTokenVerifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void verify(String token, String nonce, Integer maxAuthenticationAge) thr
if (isEmpty(orgNameClaim)) {
throw new IdTokenValidationException("Organization name (org_name) claim must be a string present in the ID token");
}
if (!org.equalsIgnoreCase(orgNameClaim)) {
if (!org.toLowerCase().equals(orgNameClaim)) {
throw new IdTokenValidationException(String.format("Organization (org_name) claim mismatch in the ID token; expected \"%s\" but found \"%s\"", this.organization, orgNameClaim));
}
}
Expand Down

0 comments on commit 9a4b682

Please sign in to comment.