Skip to content

Commit

Permalink
fix(jans-auth-server): validate pkce after extraction data from reque…
Browse files Browse the repository at this point in the history
…st object (#999)

#999
  • Loading branch information
yuriyz committed Mar 10, 2022
1 parent 3f58aff commit 29fdfae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ public Response requestPushedAuthorizationRequest(
+ "customRespHeaders = {}, claims = {}, tokenBindingHeader = {}",
acrValuesStr, amrValuesStr, originHeaders, codeChallenge, codeChallengeMethod, customResponseHeaders, claims, tokenBindingHeader);

parValidator.validatePkce(codeChallenge, codeChallengeMethod, state);

List<ResponseType> responseTypes = ResponseType.fromString(responseType, " ");
ResponseMode responseModeObj = ResponseMode.getByValue(responseMode);

Expand Down Expand Up @@ -173,6 +171,8 @@ public Response requestPushedAuthorizationRequest(
par.getAttributes().setCustomParameters(requestParameterService.getCustomParameters(QueryStringDecoder.decode(httpRequest.getQueryString())));

parValidator.validateRequestObject(redirectUriResponse, par, client);

parValidator.validatePkce(par.getAttributes().getCodeChallenge(), par.getAttributes().getCodeChallengeMethod(), state);
authorizeRestWebServiceValidator.validatePkce(par.getAttributes().getCodeChallenge(), redirectUriResponse);

parService.persist(par);
Expand Down

0 comments on commit 29fdfae

Please sign in to comment.