Skip to content

Commit

Permalink
fix(jans-auth-server): for issue#315 JARM registered redirect uri (#752)
Browse files Browse the repository at this point in the history
This is correction in fix for the issue#315 to ensure registered redirectUri
  • Loading branch information
HemantKMehta committed Feb 2, 2022
1 parent e5401b2 commit fe2dc59
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ public void validateRequestObject(JwtAuthorizationRequest jwtRequest, RedirectUr
Client client = clientService.getClient(jwtRequest.getClientId());
if (redirectUri != null && redirectionUriService.validateRedirectionUri(client, redirectUri) == null) {
log.error(" unregistered redirect uri");
throw redirectUriResponse.createWebException(AuthorizeErrorResponseType.INVALID_REQUEST_OBJECT);
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity(errorResponseFactory.getErrorAsJson(AuthorizeErrorResponseType.INVALID_REQUEST_REDIRECT_URI,
jwtRequest.getState(), "The request has unregistered request_uri"))
.type(MediaType.APPLICATION_JSON_TYPE).build());
}
if (jwtRequest.getExp() == null) {
log.error("The exp claim is not set");
Expand Down Expand Up @@ -351,4 +354,4 @@ public void validatePkce(String codeChallenge, RedirectUriResponse redirectUriRe
throw redirectUriResponse.createWebException(AuthorizeErrorResponseType.INVALID_REQUEST);
}
}
}
}

0 comments on commit fe2dc59

Please sign in to comment.