Class LoginModuleUtil
- java.lang.Object
-
- jetbrains.buildServer.serverSide.auth.AuthModuleUtil
-
- jetbrains.buildServer.serverSide.auth.LoginModuleUtil
-
public class LoginModuleUtil extends AuthModuleUtil
Utils for implementing login module.- Since:
- 8.0
- See Also:
LoginModuleDescriptor
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
USER_MODEL_KEY
-
Fields inherited from class jetbrains.buildServer.serverSide.auth.AuthModuleUtil
ALLOW_ALL_USERS_TO_LOGIN_ATTRIBUTE, ALLOW_CREATING_NEW_USERS_BY_LOGIN_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description LoginModuleUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
getObject(java.util.Map<java.lang.String,?> jaasOptions, java.lang.String key, java.lang.String description, java.lang.Class<T> objectClass)
Extracts object of the specified type from JAAS options.static UserModel
getUserModel(java.util.Map<java.lang.String,?> jaasOptions)
Extracts user model from JAAS options (it is always put there by system, so it is safe to call this method).-
Methods inherited from class jetbrains.buildServer.serverSide.auth.AuthModuleUtil
allowCreatingNewUsersByLogin
-
-
-
-
Field Detail
-
USER_MODEL_KEY
@NotNull public static final java.lang.String USER_MODEL_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUserModel
@NotNull public static UserModel getUserModel(@NotNull java.util.Map<java.lang.String,?> jaasOptions)
Extracts user model from JAAS options (it is always put there by system, so it is safe to call this method).- Parameters:
jaasOptions
- JAAS options- Returns:
- user model
- See Also:
LoginModuleDescriptor
,LoginModule
-
getObject
@NotNull public static <T> T getObject(@NotNull java.util.Map<java.lang.String,?> jaasOptions, @NotNull java.lang.String key, @NotNull java.lang.String description, @NotNull java.lang.Class<T> objectClass)
Extracts object of the specified type from JAAS options.- Parameters:
jaasOptions
- JAAS optionskey
- option keydescription
- object description to include in exception text if it is not foundobjectClass
- type of the object- Returns:
- object of the specified type
- Throws:
java.lang.RuntimeException
- if object is not found by the specified key or has wrong type
-
-