Interface ServerLoginModel
-
- All Known Implementing Classes:
ServerLoginModelImpl
public interface ServerLoginModel
- Author:
- Pavel.Sher Date: 26.09.2007
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthenticatedUserInfo
checkCredentials(UserCredentials credentials)
Verifies that user with specified credentials exists.AuthenticatedUserInfo
login(ServerPrincipal principal, AuthModule<? extends AuthModuleType> authModule)
Authenticates the specified user, i.e.: - grants this user a license - updates user last login timestamp - sets successfully authenticated user in the security contextAuthenticatedUserInfo
login(UserCredentials credentials)
Checks that user with specified credentials exists and attempts to login this user, i.e.: - grants this user a license - updates user last login timestamp - sets successfully authenticated user in the security contextAuthorityHolder
updateSecurityContext(AuthorityHolder authorityHolder)
Checks whether the specified user can still be logged in, i.e.: - the user exists - the user still has a license If all checks are successful, then the security context is updated with the specified user
-
-
-
Method Detail
-
checkCredentials
@NotNull AuthenticatedUserInfo checkCredentials(@NotNull UserCredentials credentials) throws AuthenticationFailedException
Verifies that user with specified credentials exists. Does not check that a license can be granted to this user.- Parameters:
credentials
- user credentials- Returns:
- user with specified credentials
- Throws:
AuthenticationFailedException
- if user with specified credentials was not found
-
login
@NotNull AuthenticatedUserInfo login(@NotNull UserCredentials credentials) throws AuthenticationFailedException
Checks that user with specified credentials exists and attempts to login this user, i.e.: - grants this user a license - updates user last login timestamp - sets successfully authenticated user in the security context- Parameters:
credentials
- user credentials- Returns:
- successfully authenticated user
- Throws:
AuthenticationFailedException
- if there are no users with specified username and password
-
login
@NotNull AuthenticatedUserInfo login(@NotNull ServerPrincipal principal, @NotNull AuthModule<? extends AuthModuleType> authModule) throws AuthenticationFailedException
Authenticates the specified user, i.e.: - grants this user a license - updates user last login timestamp - sets successfully authenticated user in the security context- Parameters:
principal
- principalauthModule
- authentication module used to login- Returns:
- successfully authenticated user
- Throws:
AuthenticationFailedException
-
updateSecurityContext
@NotNull AuthorityHolder updateSecurityContext(@NotNull AuthorityHolder authorityHolder) throws UserNotFoundException
Checks whether the specified user can still be logged in, i.e.: - the user exists - the user still has a license If all checks are successful, then the security context is updated with the specified user- Returns:
- user currently stored in the security context
- Throws:
UserNotFoundException
- if user does not exist
-
-