public abstract class AbstractStatefulRealm extends AbstractRealm implements Comparable<Realm>
| Modifier and Type | Field and Description |
|---|---|
protected GroupMapper |
groupMapper |
protected static String |
GROUPS_SEP
Separator of group values: ","
|
static String |
PARAM_DEFAULT_DIGEST_ALGORITHM
Realm parameter: "default-digest-algorithm"
|
static String |
PARAM_GROUP_MAPPING
Realm parameter: "group-mapping"
|
static String |
PARAM_GROUPS
Realm parameter: "assign-groups".
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStatefulRealm()
The default the constructor creates a realm which will later be initialized,
either from properties or by deserializing.
|
| Modifier and Type | Method and Description |
|---|---|
protected String[] |
addAssignGroups(String[] groups)
Add assign groups to given array of groups.
|
int |
compareTo(Realm otherRealm)
Compares a realm to another.
|
protected String |
getDefaultDigestAlgorithm() |
String |
getJAASContext()
Returns name of JAAS context used by this realm.
|
protected ArrayList<String> |
getMappedGroupNames(String group) |
String |
getName()
Returns the name of this realm.
|
protected Properties |
getProperties() |
String |
getProperty(String name)
Get a realm property.
|
protected void |
init(Properties properties)
Initialize a realm with some properties.
|
void |
refresh(String configName)
Refreshes the realm data so that new users/groups are visible.
|
protected void |
setName(String name)
Assigns the name of this realm, and stores it in the cache of realms.
|
void |
setProperty(String name,
String value)
Set a realm property.
|
String |
toString()
Returns the name of this realm.
|
addUser, getAuthType, getGroupNames, getGroupNames, getUser, getUserNames, persist, refresh, removeUser, supportsUserManagement, updateUserpublic static final String PARAM_GROUP_MAPPING
public static final String PARAM_GROUPS
Comma separated. All users authenticated by this realm will be in these groups
public static final String PARAM_DEFAULT_DIGEST_ALGORITHM
protected static final String GROUPS_SEP
protected GroupMapper groupMapper
protected AbstractStatefulRealm()
protected void init(Properties properties) throws BadRealmException, NoSuchRealmException
properties - initialization parameters used by this realm.BadRealmException - if the configuration parameters identify a corrupt realmNoSuchRealmException - if the configuration parameters specify a realm which doesn't
existprotected String[] addAssignGroups(String[] groups)
groups - user's groups to merge with "assign-groups" parameter. Can be null.public void refresh(String configName) throws BadRealmException
configName - BadRealmException - if realm data structures are badpublic final String getName()
protected final void setName(String name)
name - name to be assigned to this realm.protected String getDefaultDigestAlgorithm()
public String getProperty(String name)
Note: requires server restart when updating or removing.
name - property name.public void setProperty(String name, String value)
Note: requires server restart when updating or removing.
name - property name.value - property value. Nulls are ignored.protected Properties getProperties()
public String getJAASContext()
JAAS context determines the login module(s) to be invoked by means of JAAS configuration file (login.conf
in domain config directory).
Default implementation uses value of realm's property jaas-context.
public String toString()
public int compareTo(Realm otherRealm)
The comparison first considers the authentication type, so that realms supporting the same kind of user authentication are grouped together. Then it compares realm realm names. Realms compare "before" other kinds of objects (i.e. there's only a partial order defined, in the case that those other objects compare themselves "before" a realm object).
compareTo in interface Comparable<Realm>Copyright © 2021. All rights reserved.