Interface GlassFishUserStore
- All Known Implementing Classes:
CertificateRealm
,FileRealm
,LDAPRealm
,Realm
,SolarisRealm
public interface GlassFishUserStore
Implementations of this interface provide access to Get user data useful for authentication purposes.
A user store has a strong connection with the concept of an identity store. In GlassFish the identity store concept
(validating caller credentials and returning user data) is split into multiple artifacts. The identity store itself
is provided by the LoginModule
, of which an implementation can use the GlassFishUserStore
if needed (but will typically need to use functionality beyond this interface as well).
GlassFish provides an extra interface to optionally Add, Update or Remove user data (via the admin console of GlassFish) via
the GlassFishUserManagement
interface. This one is however rarely implemented, as most systems behind the user store (like
LDAP and Database) have their own UI for this.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Enumeration
<String> Returns names of all the groups in this particular realm.getGroupNames
(String username) Returns the name of all the groups that this user belongs todefault User
Returns the information recorded about a particular named user.default Enumeration
<String> Returns names of all the users in this particular realm.default void
refresh()
Refreshes the realm data so that new users/groups are visible.
-
Method Details
-
getUserNames
Returns names of all the users in this particular realm.- Returns:
- enumeration of user names (strings)
- Throws:
BadRealmException
- if realm data structures are bad
-
getUser
Returns the information recorded about a particular named user.- Parameters:
name
- name of the user whose information is desired- Returns:
- the user object
- Throws:
NoSuchUserException
- if the user doesn't existBadRealmException
- if realm data structures are bad
-
getGroupNames
Returns names of all the groups in this particular realm.- Returns:
- enumeration of group names (strings)
- Throws:
BadRealmException
- if realm data structures are bad
-
getGroupNames
Returns the name of all the groups that this user belongs to- Parameters:
username
- name of the user in this realm whose group listing is needed.- Returns:
- enumeration of group names (strings)
- Throws:
InvalidOperationException
- thrown if the realm does not support this operationNoSuchUserException
-
refresh
Refreshes the realm data so that new users/groups are visible.- Throws:
BadRealmException
- if realm data structures are bad
-