Interface GlassFishUserManagement
- All Known Implementing Classes:
CertificateRealm
,FileRealm
,LDAPRealm
,Realm
,SolarisRealm
public interface GlassFishUserManagement
Implementations of this interface provide operations to Add, Update or Remove user data (called user management) that is used for
authentication when using GlassFish native identity stores (the
LoginModule
.
Identity stores often provide access to external systems (like LDAP, Databases, etc) which have their own UI for managing such data.
As such user management is rarely implemented, and only Get user data is used, which is provided by GlassFishUserStore
implementations.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Adds new user to file realm.default void
Adds new user to file realm.default void
persist()
Persist the realm data to permanent storagedefault void
removeUser
(String name) Remove user from file realm.default boolean
default void
updateUser
(String name, String newName, char[] password, String[] groups) Update data for an existing user.default void
updateUser
(String name, String newName, String password, String[] groups) Update data for an existing user.
-
Method Details
-
supportsUserManagement
default boolean supportsUserManagement()- Returns:
- true if the realm implementation support User Management (add,remove,update user)
-
addUser
default void addUser(String name, String password, String[] groupList) throws BadRealmException, IASSecurityException Adds new user to file realm. User cannot exist already. -
addUser
default void addUser(String name, char[] password, String[] groupList) throws BadRealmException, IASSecurityException Adds new user to file realm. User cannot exist already.- Parameters:
name
- User name.password
- Cleartext password for the user.groupList
- List of groups to which user belongs.- Throws:
BadRealmException
- If there are problems adding user.IASSecurityException
-
updateUser
default void updateUser(String name, String newName, String password, String[] groups) throws NoSuchUserException, BadRealmException, IASSecurityException Update data for an existing user. User must exist. -
updateUser
default void updateUser(String name, String newName, char[] password, String[] groups) throws NoSuchUserException, BadRealmException, IASSecurityException Update data for an existing user. User must exist.- Parameters:
name
- Current name of the user to update.newName
- New name to give this user. It can be the same as the original name. Otherwise it must be a new user name which does not already exist as a user.password
- Cleartext password for the user. If non-null the user password is changed to this value. If null, the original password is retained.groupList
- List of groups to which user belongs.- Throws:
BadRealmException
- If there are problems adding user.NoSuchUserException
- If user does not exist.IASSecurityException
-
removeUser
Remove user from file realm. User must exist.- Parameters:
name
- User name.- Throws:
NoSuchUserException
- If user does not exist.BadRealmException
-
persist
Persist the realm data to permanent storage- Throws:
BadRealmException
-