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 classServerLoginModelImpl.UserCredentialsCallbackHandler
-
Field Summary
Fields Modifier and Type Field Description static StringTEAMCITY_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 AuthenticatedUserInfocheckCredentials(UserCredentials credentials)Verifies that user with specified credentials exists.AuthenticatedUserInfologin(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 contextAuthenticatedUserInfologin(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 contextAuthorityHolderupdateSecurityContext(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:ServerLoginModelVerifies that user with specified credentials exists. Does not check that a license can be granted to this user.- Specified by:
checkCredentialsin 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:ServerLoginModelChecks 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:
loginin 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:ServerLoginModelAuthenticates 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:
loginin 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:ServerLoginModelChecks 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:
updateSecurityContextin interfaceServerLoginModel- Returns:
- user currently stored in the security context
- Throws:
UserNotFoundException- if user does not exist
-
-