Skip to content

Commit

Permalink
[ALS-5514] Use unauthorizedError in place of less specific error
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 committed Jan 30, 2024
1 parent 053a927 commit b532fd7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Response authenticate(UriInfo uriInfo, Map<String, String> authRequest) {
User user = initializeUser(introspectResponse);

if (user == null) {
return PICSUREResponse.error("User not authenticated.");
return PICSUREResponse.unauthorizedError("User not authenticated.");
}

HashMap<String, String> responseMap = createUserClaims(user);
Expand All @@ -64,7 +64,7 @@ public Response authenticate(UriInfo uriInfo, Map<String, String> authRequest) {
}

logger.info("LOGIN FAILED ___ USER NOT AUTHENTICATED ___");
return PICSUREResponse.error("User not authenticated");
return PICSUREResponse.unauthorizedError("User not authenticated");
}

private User initializeUser(JsonNode introspectResponse) {
Expand Down

0 comments on commit b532fd7

Please sign in to comment.