public interface AuthenticationManagement
Service methods for user authentication.
| Modifier and Type | Method and Description |
|---|---|
UserDetails |
checkLocalUserPasswordOnLogin(String username,
String password)
Check the password of a local user for a match with a given clear text password.
|
User |
onSuccessfulAuthentication(org.springframework.security.core.Authentication successAuthentication)
This method finalizes the login process of a user.
|
void |
onSuccessfulAuthentication(Long userId)
This method finalizes the login process of a user.
|
void |
onUsernamePasswordAuthenticationFailed(String username)
Should be called if a username and password authentication for a user failed because of a
wrong password.
|
void |
onUsernamePasswordAuthenticationFailed(String externalUserId,
String externalSystemId)
Should be called if a username and password authentication for a user failed because of a
wrong password.
|
void |
validateUserLogin(Long userId)
Does additional login checks.
|
UserDetails checkLocalUserPasswordOnLogin(String username, String password) throws UserNotFoundException, AccountNotActivatedException, AuthAgainstInternalDBWhileExternalUserAccountException
username - the login name which can be the alias or the email address of the userpassword - the clear text password to test againstUserNotFoundException - in case the user does not existAccountNotActivatedException - in case the user account is not activeAuthAgainstInternalDBWhileExternalUserAccountException - in case the user was provided by the active primary external user repositoryUser onSuccessfulAuthentication(org.springframework.security.core.Authentication successAuthentication)
Note: This method assumes that there is NO existing transaction. If there is a current transaction it will fail!
successAuthentication - the authentication to be used. it should contain UserDetails in most of the casesvoid onSuccessfulAuthentication(Long userId) throws UserNotFoundException
Note: This method assumes that there is NO existing transaction. If there is a current transaction it will fail!
userId - ID of the userUserNotFoundException - if the user does not existvoid onUsernamePasswordAuthenticationFailed(String username)
username - the internal login name (e-mail or alias) of the user whose authentication failedvoid onUsernamePasswordAuthenticationFailed(String externalUserId, String externalSystemId)
externalUserId - the login name of the user in the external system whose authentication failedexternalSystemId - the ID of the external systemvoid validateUserLogin(Long userId) throws AccountPermanentlyLockedException, AccountTemporarilyLockedException, AccountNotActivatedException, TermsNotAcceptedException, UserNotFoundException, AccountPermanentlyDisabledException, AccountTemporarilyDisabledException
userId - the Id of the userAccountPermanentlyLockedExceptionAccountTemporarilyLockedExceptionAccountNotActivatedExceptionTermsNotAcceptedExceptionUserNotFoundExceptionAccountPermanentlyDisabledExceptionAccountTemporarilyDisabledExceptionCopyright © 2019 Communote team. All rights reserved.