Skip to content

Commit

Permalink
Update unauthorized message on session expiry
Browse files Browse the repository at this point in the history
Changed the unauthorized error message to inform users their session has expired and prompt them to log in again. This enhances clarity and user experience by providing a specific reason for the authorization failure.
  • Loading branch information
Gcolon021 committed Oct 22, 2024
1 parent 7b8c9bb commit f71a86c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void filter(ContainerRequestContext requestContext) throws IOException {
if (isExplorer) {
// If the request is coming from the explorer, we should not allow open access
logger.error("User is not authorized.");
requestContext.abortWith(PICSUREResponse.unauthorizedError("User is not authorized."));
requestContext.abortWith(PICSUREResponse.unauthorizedError("Your session has expired. Please log in again."));
}

boolean isAuthorized = callOpenAccessValidationEndpoint(requestContext);
Expand Down

0 comments on commit f71a86c

Please sign in to comment.