public interface AuthenticationService
Modifier and Type | Method and Description |
---|---|
Authentication |
authenticate(String username,
String password)
Attempts to authenticate the specified user given their password.
|
Authentication |
authenticateWithCaptcha(String username,
String password)
Attempts to authenticate the specified user given their password.
|
Authentication |
clear()
Clears the current authentication, if any, resulting in an anonymous context
|
Authentication |
get() |
Authentication |
set(Authentication authentication)
Sets the authentication for the current thread (and thereby request)
|
@Nonnull Authentication authenticate(@Nonnull String username, @Nonnull String password)
Note: this method only authenticates; it does not apply the authentication to the current request, nor does it call any authentication success or failure handlers.
username
- the usernamepassword
- the user's passwordApplicationUser
representing the authenticated userAuthenticationSystemException
- if a failure occurs in CrowdExpiredPasswordAuthenticationException
- if the user's password has expired and must be changedInactiveUserAuthenticationException
- if the specified user is inactiveIncorrectPasswordAuthenticationException
- if the provided password is incorrectNoSuchUserException
- if the specified user does not exist or their user details cannot be retrievedclear()
@Nonnull Authentication authenticateWithCaptcha(@Nonnull String username, @Nonnull String password)
CaptchaRequiredAuthenticationException
Note: this method only authenticates; it does not apply the authentication to the current request, nor does it call any authentication success or failure handlers.
username
- the usernamepassword
- the user's passwordAuthentication
representing the authenticated user and additional propertiesAuthenticationSystemException
- if a failure occurs in one of the authentication handlersCaptchaRequiredAuthenticationException
- if CAPTCHA is requiredExpiredPasswordAuthenticationException
- if the user's password has expired and must be changedInactiveUserAuthenticationException
- if the specified user is inactiveIncorrectPasswordAuthenticationException
- if the provided password is incorrectNoSuchUserException
- if the specified user does not exist or their user details cannot be retrieved@Nonnull Authentication clear()
@Nonnull Authentication get()
@Nonnull Authentication set(@Nonnull Authentication authentication)
authentication
- the authentication to setCopyright © 2019 Atlassian. All rights reserved.