@Component(value="cuba_AuthenticationManager") public class AuthenticationManagerBean extends java.lang.Object implements AuthenticationManager
NAME
Constructor and Description |
---|
AuthenticationManagerBean() |
Modifier and Type | Method and Description |
---|---|
AuthenticationDetails |
authenticate(Credentials credentials)
Authenticates a user and provides authentication details.
|
AuthenticationDetails |
login(Credentials credentials)
Authenticates a user, starts session and provides authentication details.
|
void |
logout()
Log out and destroy an active user session.
|
UserSession |
substituteUser(User substitutedUser)
Substitute a user, obtaining all its security related environment.
|
@Nonnull public AuthenticationDetails authenticate(Credentials credentials) throws LoginException
AuthenticationManager
authenticate
in interface AuthenticationManager
credentials
- credentialsLoginException
- if authentication fails@Nonnull public AuthenticationDetails login(Credentials credentials) throws LoginException
AuthenticationManager
login
in interface AuthenticationManager
credentials
- credentialsLoginException
- if authentication fails@Nonnull public UserSession substituteUser(User substitutedUser)
AuthenticationManager
substituteUser
in interface AuthenticationManager
substitutedUser
- a user to substitute. Must be in the current users' User.substitutions
list.AuthenticationService.substituteUser(User)
public void logout()
AuthenticationManager
logout
in interface AuthenticationManager
AuthenticationService.logout()