Interface LoginConfiguration
-
- All Superinterfaces:
XmlExternalizable
- All Known Subinterfaces:
LoginConfigurationEx
- All Known Implementing Classes:
LoginConfigurationImpl
,SecuredLoginConfiguration
public interface LoginConfiguration extends XmlExternalizable
Maintains information about all available authentication modules. Each authentication module is described withAuthModuleType
object. To register new authentication module use moduleregisterAuthModuleType(AuthModuleType)
.- See Also:
LoginModuleDescriptor
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_GUEST_USERNAME
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Configuration
createJAASConfiguration()
Deprecated.Configuration
createJAASConfiguration(AuthModule<LoginModuleDescriptor> loginModuleWithProperties)
Creates JAAS login configuration for specified login module with properties.AuthModuleType
findAuthModuleTypeByName(String authModuleTypeName)
Returns registered authentication module type with the specified name.String
getAuthType()
Deprecated.since useless<T extends AuthModuleType>
List<AuthModule<T>>getConfiguredAuthModules(Class<T> baseClass)
Returns authentication modules configured in config file.List<AuthModule<LoginModuleDescriptor>>
getConfiguredLoginModules()
Returns enabled login modules in the order they are specified in config file.String
getGuestUsername()
Returns username of the guest userCollection<AuthModuleType>
getRegisteredAuthModuleTypes()
Returns collection of registered authentication module types.Collection<LoginModuleDescriptor>
getRegisteredLoginModules()
Returns collection of registered login module descriptors.LoginModuleDescriptor
getSelectedLoginModuleDescriptor()
Deprecated.String
getTextForLoginPage()
Returns text to show on the login page.boolean
isAtLeastOneAuthModuleConfigured(Collection<Class<? extends AuthModuleType>> classes)
Returns true if at least one authentication module with one of the specified type classes is configured.<T extends AuthModuleType>
booleanisAuthModuleConfigured(Class<T> clazz)
Returns true if authentication module with the specified type class is configured.boolean
isDefaultLoginConfigured()
Returns true if default login module is configured (authorization via own server database).boolean
isFreeRegistrationAllowed()
Returns true if free user account registration is allowed.boolean
isGuestLoginAllowed()
Returns true if guest login is allowed.boolean
isOnlyDefaultLoginConfigured()
Returns true if default login module is configured (authorization via own server database) and no other login modules are configured.boolean
isRootLoginAllowed()
Returns true if root login is allowed.boolean
isUsersCanChangeOwnPasswords()
Returns true if users are allowed to change own passwords for built-in authentication module.void
registerAuthModuleType(AuthModuleType authModuleType)
Registers new authentication modulevoid
registerLoginModule(LoginModuleDescriptor moduleDescriptor)
Deprecated.-
Methods inherited from interface jetbrains.buildServer.XmlExternalizable
writeTo
-
-
-
-
Field Detail
-
DEFAULT_GUEST_USERNAME
@NotNull static final String DEFAULT_GUEST_USERNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerLoginModule
@Deprecated void registerLoginModule(@NotNull LoginModuleDescriptor moduleDescriptor)
Deprecated.Registers new login module- Parameters:
moduleDescriptor
- descriptor of the login module
-
registerAuthModuleType
void registerAuthModuleType(@NotNull AuthModuleType authModuleType)
Registers new authentication module- Parameters:
authModuleType
- type of the authentication module- Since:
- 8.0
-
getTextForLoginPage
@Nullable String getTextForLoginPage()
Returns text to show on the login page.- Returns:
- text to show on the login page.
-
isDefaultLoginConfigured
boolean isDefaultLoginConfigured()
Returns true if default login module is configured (authorization via own server database).- Returns:
- true if default login module is configured (authorization via own server database).
-
isOnlyDefaultLoginConfigured
boolean isOnlyDefaultLoginConfigured()
Returns true if default login module is configured (authorization via own server database) and no other login modules are configured.- Returns:
- true if default login module is configured
- Since:
- 8.0
-
isAuthModuleConfigured
<T extends AuthModuleType> boolean isAuthModuleConfigured(@NotNull Class<T> clazz)
Returns true if authentication module with the specified type class is configured.- Returns:
- true if authentication module with the specified type class is configured
- Since:
- 8.0
-
isAtLeastOneAuthModuleConfigured
boolean isAtLeastOneAuthModuleConfigured(@NotNull Collection<Class<? extends AuthModuleType>> classes)
Returns true if at least one authentication module with one of the specified type classes is configured.- Returns:
- true if at least one authentication module with one of the specified type classes is configured
- Since:
- 8.0
-
getSelectedLoginModuleDescriptor
@Deprecated @NotNull LoginModuleDescriptor getSelectedLoginModuleDescriptor()
Deprecated.Returns descriptor of the first configured login module.- Returns:
- descriptor of the first configured login module
-
getConfiguredLoginModules
@NotNull List<AuthModule<LoginModuleDescriptor>> getConfiguredLoginModules()
Returns enabled login modules in the order they are specified in config file. Never returns empty list: if no login modules are configured, returns the list that contains only default login module.- Returns:
- see above
- Since:
- 8.0
-
isGuestLoginAllowed
boolean isGuestLoginAllowed()
Returns true if guest login is allowed.- Returns:
- true if guest login is allowed
-
isRootLoginAllowed
boolean isRootLoginAllowed()
Returns true if root login is allowed.- Returns:
- true if root login is allowed
-
getGuestUsername
@NotNull String getGuestUsername()
Returns username of the guest user- Returns:
- username of the guest user
-
isFreeRegistrationAllowed
boolean isFreeRegistrationAllowed()
Returns true if free user account registration is allowed. Free registration can be enabled only if default login module selected.- Returns:
- true if free user account registration is allowed
-
isUsersCanChangeOwnPasswords
boolean isUsersCanChangeOwnPasswords()
Returns true if users are allowed to change own passwords for built-in authentication module.- Returns:
- see above
- Since:
- 8.0
-
getRegisteredLoginModules
@NotNull Collection<LoginModuleDescriptor> getRegisteredLoginModules()
Returns collection of registered login module descriptors.- Returns:
- collection of registered login module descriptors
-
getRegisteredAuthModuleTypes
@NotNull Collection<AuthModuleType> getRegisteredAuthModuleTypes()
Returns collection of registered authentication module types.- Returns:
- collection of registered authentication module types
- Since:
- 8.0
-
findAuthModuleTypeByName
@Nullable AuthModuleType findAuthModuleTypeByName(@NotNull String authModuleTypeName)
Returns registered authentication module type with the specified name.- Returns:
- type or null if not found
- Since:
- 8.0
-
createJAASConfiguration
@Deprecated Configuration createJAASConfiguration()
Deprecated.Creates JAAS login configuration for first configured login module.- Returns:
- JAAS login configuration
-
createJAASConfiguration
@NotNull Configuration createJAASConfiguration(@NotNull AuthModule<LoginModuleDescriptor> loginModuleWithProperties)
Creates JAAS login configuration for specified login module with properties.- Returns:
- JAAS login configuration
- Since:
- 8.0
-
getConfiguredAuthModules
@NotNull <T extends AuthModuleType> List<AuthModule<T>> getConfiguredAuthModules(@Nullable Class<T> baseClass)
Returns authentication modules configured in config file.- Parameters:
baseClass
- auth module descriptor base class to filter auth modules or null to return all- Returns:
- see above
- Since:
- 8.0
-
getAuthType
@Deprecated String getAuthType()
Deprecated.since uselessAlways returns "mixed" string.- Returns:
- see above
-
-