Skip to content

Commit

Permalink
Merge pull request #52 from aka4rKO/main-int
Browse files Browse the repository at this point in the history
Changed order of validation to avoid server error
  • Loading branch information
imesh94 authored Dec 3, 2024
2 parents 1d17f36 + 3b00b02 commit 9505e97
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ public boolean authenticateClient(HttpServletRequest httpServletRequest, Map<Str
OAuthClientAuthnContext oAuthClientAuthnContext)
throws OAuthClientAuthnException {

// Checks if assertion is valid before validating the client id against the subject claim
boolean isValidAssertion = jwtValidator.isValidAssertion(getSignedJWT(bodyParameters, oAuthClientAuthnContext));
if (!isValidAssertion) {
return false;
}

validateClientIdAgainstSubClaim(httpServletRequest, bodyParameters, oAuthClientAuthnContext);
return jwtValidator.isValidAssertion(getSignedJWT(bodyParameters, oAuthClientAuthnContext));
return true;
}

/**
Expand Down

0 comments on commit 9505e97

Please sign in to comment.