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 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(Map<String,?> jaasOptions, String key, String description, Class<T> objectClass)
Extracts object of the specified type from JAAS options.static UserModel
getUserModel(Map<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 String USER_MODEL_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUserModel
@NotNull public static UserModel getUserModel(@NotNull Map<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 Map<String,?> jaasOptions, @NotNull String key, @NotNull String description, @NotNull 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:
RuntimeException
- if object is not found by the specified key or has wrong type
-
-