public interface AuthenticationService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
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.
|
static final java.lang.String NAME
@Nonnull AuthenticationDetails authenticate(Credentials credentials) throws LoginException
credentials
- credentialsLoginException
- if authentication fails@Nonnull AuthenticationDetails login(Credentials credentials) throws LoginException
credentials
- credentialsLoginException
- if authentication fails@Nonnull UserSession substituteUser(User substitutedUser)
substitutedUser
- a user to substitute. Must be in the current users' User.getSubstitutions()
list.void logout()
NoUserSessionException
- if session is absent or expired