Interface CrowdApplicationAuthenticationService
public interface CrowdApplicationAuthenticationService
Service for creating persistent sessions for specified users.
- Since:
- 6.2
-
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String username) Authenticates the user to the Crowd application.voidlogout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Logs out the user from the Crowd application.
-
Method Details
-
authenticate
void authenticate(@Nonnull jakarta.servlet.http.HttpServletRequest request, @Nullable jakarta.servlet.http.HttpServletResponse response, @Nonnull String username) throws com.atlassian.crowd.manager.application.ApplicationAccessDeniedException, com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.InactiveAccountException, com.atlassian.crowd.exception.InvalidAuthenticationException Authenticates the user to the Crowd application. This method will result in generating a Crowd session token, which can be used to access the Crowd application. The user's credentials will not be verified, it is the caller's responsibility to ensure the user can authenticate.- Parameters:
request- the currently executed requestresponse- the currently executed response, token cookie won't be set when nullusername- the name of the user who should be treated as authenticated- Throws:
com.atlassian.crowd.exception.InvalidAuthenticationException- if the authentication was not successful.com.atlassian.crowd.exception.OperationFailedException- if the error was thrown by directory implementation when attempting to find or authenticate the user.com.atlassian.crowd.exception.InactiveAccountException- if the user account is inactive.com.atlassian.crowd.manager.application.ApplicationAccessDeniedException- if the user does not have access to authenticate with the Crowd application.
-
logout
void logout(@Nonnull jakarta.servlet.http.HttpServletRequest request, @Nullable jakarta.servlet.http.HttpServletResponse response) Logs out the user from the Crowd application. This method will result in invalidating the user's session token.- Parameters:
request- the currently executed requestresponse- the currently executed response, token cookie won't be invalidated when response is null- Since:
- 6.3
-