Skip to content

Commit

Permalink
oxTrust issue #513
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhar16 committed Apr 7, 2017
1 parent 8a82b48 commit 1444dc1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,13 @@ private String requestAccessToken(String oxAuthHost, String authorizationCode, S
log.error("Failed to parse id_token");
return OxTrustConstants.RESULT_NO_PERMISSIONS;
}

String issuer = openIdConfiguration.getIssuer();
String responseIssuer = (String) jwt.getClaims().getClaim(JwtClaimName.ISSUER);
if (issuer == null || responseIssuer == null || !issuer.equals(responseIssuer)) {
log.error("User info response : Issuer.");
return OxTrustConstants.RESULT_NO_PERMISSIONS;
}

List<String> acrValues = jwt.getClaims().getClaimAsStringList(JwtClaimName.AUTHENTICATION_CONTEXT_CLASS_REFERENCE);
if ((acrValues == null) || (acrValues.size() == 0) || !acrValues.contains(requestAcrValues)) {
Expand Down

0 comments on commit 1444dc1

Please sign in to comment.