Class ServerLoginModelImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl
-
- All Implemented Interfaces:
ServerLoginModel
public class ServerLoginModelImpl extends Object implements ServerLoginModel
- Author:
- Pavel.Sher Date: 10.04.2006
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServerLoginModelImpl.UserCredentialsCallbackHandler
-
Field Summary
Fields Modifier and Type Field Description static String
TEAMCITY_USER_DISABLED_USERS
-
Constructor Summary
Constructors Constructor Description ServerLoginModelImpl(LoginConfiguration loginConfiguration, UserModelEx userModelEx, SecurityContextEx securityContext, ServerResponsibility serverResponsibility, EventDispatcher<UserAuthListener> userAuthDispatcher, SpecialUsersLoginModuleDescriptor specialUsersLoginModuleDescriptor, ExecutorServices executorServices)
-
Method Summary
All Methods Instance Methods Concrete 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
-
-
-
Field Detail
-
TEAMCITY_USER_DISABLED_USERS
public static final String TEAMCITY_USER_DISABLED_USERS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ServerLoginModelImpl
public ServerLoginModelImpl(@NotNull LoginConfiguration loginConfiguration, @NotNull UserModelEx userModelEx, @NotNull SecurityContextEx securityContext, @NotNull ServerResponsibility serverResponsibility, @NotNull EventDispatcher<UserAuthListener> userAuthDispatcher, @NotNull SpecialUsersLoginModuleDescriptor specialUsersLoginModuleDescriptor, @NotNull ExecutorServices executorServices)
-
-
Method Detail
-
checkCredentials
@NotNull public AuthenticatedUserInfo checkCredentials(@NotNull UserCredentials credentials) throws AuthenticationFailedException
Description copied from interface:ServerLoginModel
Verifies that user with specified credentials exists. Does not check that a license can be granted to this user.- Specified by:
checkCredentials
in interfaceServerLoginModel
- Parameters:
credentials
- user credentials- Returns:
- user with specified credentials
- Throws:
AuthenticationFailedException
- if user with specified credentials was not found
-
login
@NotNull public AuthenticatedUserInfo login(@NotNull UserCredentials credentials) throws AuthenticationFailedException
Description copied from interface:ServerLoginModel
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- Specified by:
login
in interfaceServerLoginModel
- Parameters:
credentials
- user credentials- Returns:
- successfully authenticated user
- Throws:
AuthenticationFailedException
- if there are no users with specified username and password
-
login
@NotNull public AuthenticatedUserInfo login(@NotNull ServerPrincipal principal, @NotNull AuthModule<? extends AuthModuleType> authModule) throws AuthenticationFailedException
Description copied from interface:ServerLoginModel
Authenticates the specified user, i.e.: - grants this user a license - updates user last login timestamp - sets successfully authenticated user in the security context- Specified by:
login
in interfaceServerLoginModel
- Parameters:
principal
- principalauthModule
- authentication module used to login- Returns:
- successfully authenticated user
- Throws:
AuthenticationFailedException
-
updateSecurityContext
@NotNull public AuthorityHolder updateSecurityContext(@NotNull AuthorityHolder authorityHolder) throws UserNotFoundException
Description copied from interface:ServerLoginModel
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- Specified by:
updateSecurityContext
in interfaceServerLoginModel
- Returns:
- user currently stored in the security context
- Throws:
UserNotFoundException
- if user does not exist
-
-