@Transactional(propagation=REQUIRED) public abstract class AuthenticationManagementBase extends Object implements AuthenticationManagement
Spring Service base class for
com.communote.server.core.api.security.AuthenticationManagement
, provides access to
all services and entities referenced by this service.
AuthenticationManagement
Constructor and Description |
---|
AuthenticationManagementBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract User |
handleOnSuccessfulAuthentication(org.springframework.security.core.Authentication authentication)
Performs the core logic for
onSuccessfulAuthentication(Authentication) |
protected abstract void |
handleOnSuccessfulAuthentication(Long userId) |
protected abstract void |
handleValidateUserLogin(Long userId) |
User |
onSuccessfulAuthentication(org.springframework.security.core.Authentication authentication)
This method finalizes the login process of a user.
|
void |
onSuccessfulAuthentication(Long userId)
This method finalizes the login process of a user.
|
void |
validateUserLogin(Long userId)
Does additional login checks.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkLocalUserPasswordOnLogin, onUsernamePasswordAuthenticationFailed, onUsernamePasswordAuthenticationFailed
protected abstract User handleOnSuccessfulAuthentication(org.springframework.security.core.Authentication authentication)
onSuccessfulAuthentication(Authentication)
protected abstract void handleOnSuccessfulAuthentication(Long userId) throws UserNotFoundException
UserNotFoundException
protected abstract void handleValidateUserLogin(Long userId) throws AccountPermanentlyLockedException, AccountTemporarilyLockedException, AccountNotActivatedException, TermsNotAcceptedException, UserNotFoundException, AccountPermanentlyDisabledException, AccountTemporarilyDisabledException
@Transactional(propagation=NEVER) public User onSuccessfulAuthentication(org.springframework.security.core.Authentication authentication)
AuthenticationManagement
Note: This method assumes that there is NO existing transaction. If there is a current transaction it will fail!
onSuccessfulAuthentication
in interface AuthenticationManagement
authentication
- the authentication to be used. it should contain UserDetails in most of the casespublic void onSuccessfulAuthentication(Long userId) throws UserNotFoundException
AuthenticationManagement
Note: This method assumes that there is NO existing transaction. If there is a current transaction it will fail!
onSuccessfulAuthentication
in interface AuthenticationManagement
userId
- ID of the userUserNotFoundException
- if the user does not existpublic void validateUserLogin(Long userId) throws AccountPermanentlyLockedException, AccountTemporarilyLockedException, AccountNotActivatedException, TermsNotAcceptedException, UserNotFoundException, AccountPermanentlyDisabledException, AccountTemporarilyDisabledException
AuthenticationManagement
validateUserLogin
in interface AuthenticationManagement
userId
- the Id of the userAccountPermanentlyLockedException
AccountTemporarilyLockedException
AccountNotActivatedException
TermsNotAcceptedException
UserNotFoundException
AccountPermanentlyDisabledException
AccountTemporarilyDisabledException
Copyright © 2019 Communote team. All rights reserved.