jetbrains.buildServer.serverSide.auth
Interface LoginConfiguration

All Superinterfaces:
XmlExternalizable

public interface LoginConfiguration
extends XmlExternalizable

Maintains information about all available authentication modules. Each authentication module is described with AuthModuleType object. To register new authentication module use module registerAuthModuleType(AuthModuleType).

See Also:
LoginModuleDescriptor

Field Summary
static java.lang.String DEFAULT_GUEST_USERNAME
           
 
Method Summary
 javax.security.auth.login.Configuration createJAASConfiguration()
          Deprecated. use createJAASConfiguration(AuthModule)
 javax.security.auth.login.Configuration createJAASConfiguration(AuthModule<LoginModuleDescriptor> loginModuleWithProperties)
          Creates JAAS login configuration for specified login module with properties.
 AuthModuleType findAuthModuleTypeByName(java.lang.String authModuleTypeName)
          Returns registered authentication module type with the specified name.
 java.lang.String getAuthType()
          Deprecated. since useless
<T extends AuthModuleType>
java.util.List<AuthModule<T>>
getConfiguredAuthModules(java.lang.Class<T> baseClass)
          Returns authentication modules configured in config file.
 java.util.List<AuthModule<LoginModuleDescriptor>> getConfiguredLoginModules()
          Returns enabled login modules in the order they are specified in config file.
 java.lang.String getGuestUsername()
          Returns username of the guest user
 java.util.Collection<AuthModuleType> getRegisteredAuthModuleTypes()
          Returns collection of registered authentication module types.
 java.util.Collection<LoginModuleDescriptor> getRegisteredLoginModules()
          Returns collection of registered login module descriptors.
 LoginModuleDescriptor getSelectedLoginModuleDescriptor()
          Deprecated. use getConfiguredLoginModules()
 java.lang.String getTextForLoginPage()
          Returns text to show on the login page.
 boolean isAtLeastOneAuthModuleConfigured(java.util.Collection<java.lang.Class<? extends AuthModuleType>> classes)
          Returns true if at least one authentication module with one of the specified type classes is configured.
<T extends AuthModuleType>
boolean
isAuthModuleConfigured(java.lang.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 module
 void registerLoginModule(LoginModuleDescriptor moduleDescriptor)
          Deprecated. use registerAuthModuleType(AuthModuleType)
 
Methods inherited from interface jetbrains.buildServer.XmlExternalizable
writeTo
 

Field Detail

DEFAULT_GUEST_USERNAME

@NotNull
static final java.lang.String DEFAULT_GUEST_USERNAME
See Also:
Constant Field Values
Method Detail

registerLoginModule

@Deprecated
void registerLoginModule(@NotNull
                                    LoginModuleDescriptor moduleDescriptor)
Deprecated. use registerAuthModuleType(AuthModuleType)

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
java.lang.String getTextForLoginPage()
Returns text to show on the login page.

Returns:

isDefaultLoginConfigured

boolean isDefaultLoginConfigured()
Returns true if default login module is configured (authorization via own server database).

Returns:

isOnlyDefaultLoginConfigured

boolean isOnlyDefaultLoginConfigured()
Returns true if default login module is configured (authorization via own server database) and no other login modules are configured.

Returns:
Since:
8.0

isAuthModuleConfigured

<T extends AuthModuleType> boolean isAuthModuleConfigured(@NotNull
                                                          java.lang.Class<T> clazz)
Returns true if authentication module with the specified type class is configured.

Returns:
Since:
8.0

isAtLeastOneAuthModuleConfigured

boolean isAtLeastOneAuthModuleConfigured(@NotNull
                                         java.util.Collection<java.lang.Class<? extends AuthModuleType>> classes)
Returns true if at least one authentication module with one of the specified type classes is configured.

Returns:
Since:
8.0

getSelectedLoginModuleDescriptor

@Deprecated
@NotNull
LoginModuleDescriptor getSelectedLoginModuleDescriptor()
Deprecated. use getConfiguredLoginModules()

Returns descriptor of the first configured login module.

Returns:

getConfiguredLoginModules

@NotNull
java.util.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:

isRootLoginAllowed

boolean isRootLoginAllowed()
Returns true if root login is allowed.

Returns:

getGuestUsername

@NotNull
java.lang.String getGuestUsername()
Returns username of the guest user

Returns:

isFreeRegistrationAllowed

boolean isFreeRegistrationAllowed()
Returns true if free user account registration is allowed. Free registration can be enabled only if default login module selected.

Returns:

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
java.util.Collection<LoginModuleDescriptor> getRegisteredLoginModules()
Returns collection of registered login module descriptors.

Returns:

getRegisteredAuthModuleTypes

@NotNull
java.util.Collection<AuthModuleType> getRegisteredAuthModuleTypes()
Returns collection of registered authentication module types.

Returns:
Since:
8.0

findAuthModuleTypeByName

@Nullable
AuthModuleType findAuthModuleTypeByName(@NotNull
                                                 java.lang.String authModuleTypeName)
Returns registered authentication module type with the specified name.

Returns:
type or null if not found
Since:
8.0

createJAASConfiguration

@Deprecated
javax.security.auth.login.Configuration createJAASConfiguration()
Deprecated. use createJAASConfiguration(AuthModule)

Creates JAAS login configuration for first configured login module.

Returns:

createJAASConfiguration

@NotNull
javax.security.auth.login.Configuration createJAASConfiguration(@NotNull
                                                                        AuthModule<LoginModuleDescriptor> loginModuleWithProperties)
Creates JAAS login configuration for specified login module with properties.

Returns:
Since:
8.0

getConfiguredAuthModules

@NotNull
<T extends AuthModuleType> java.util.List<AuthModule<T>> getConfiguredAuthModules(@Nullable
                                                                                          java.lang.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
java.lang.String getAuthType()
Deprecated. since useless

Always returns "mixed" string.

Returns:
see above