@Component(value="cuba_AuthenticationService") public class AuthenticationServiceBean extends java.lang.Object implements AuthenticationService
NAME
Constructor and Description |
---|
AuthenticationServiceBean() |
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
AuthenticationService
authenticate
in interface AuthenticationService
credentials
- credentialsLoginException
- if authentication fails@Nonnull public AuthenticationDetails login(Credentials credentials) throws LoginException
AuthenticationService
login
in interface AuthenticationService
credentials
- credentialsLoginException
- if authentication fails@Nonnull public UserSession substituteUser(User substitutedUser)
AuthenticationService
substituteUser
in interface AuthenticationService
substitutedUser
- a user to substitute. Must be in the current users' User.substitutions
list.public void logout()
AuthenticationService
logout
in interface AuthenticationService