public class MemoryRealm
extends org.apache.catalina.realm.RealmBase
| Modifier and Type | Field and Description |
|---|---|
protected String |
info
Descriptive information about this Realm implementation.
|
protected static String |
name
Descriptive information about this Realm implementation.
|
| Constructor and Description |
|---|
MemoryRealm() |
| Modifier and Type | Method and Description |
|---|---|
Principal |
authenticate(String username,
String credentials)
Return the Principal associated with the specified username and
credentials, if there is one; otherwise return
null. |
String |
getInfo()
Return descriptive information about this Realm implementation and
the corresponding version number, in the format
<description>/<version>. |
protected String |
getName()
Return a short name for this Realm implementation.
|
protected String |
getPassword(String username)
Return the password associated with the given principal's user name.
|
protected Principal |
getPrincipal(String username)
Return the Principal associated with the given user name.
|
protected Map<String,org.apache.catalina.realm.GenericPrincipal> |
getPrincipals()
Returns the principals for this realm.
|
void |
start()
Prepare for active use of the public methods of this Component.
|
void |
stop()
Gracefully shut down active use of the public methods of this Component.
|
addLifecycleListener, addPropertyChangeListener, authenticate, authenticate, authenticate, backgroundProcess, destroy, digest, Digest, findLifecycleListeners, findSecurityConstraints, getAllRolesMode, getContainer, getController, getDigest, getDigest, getDigestEncoding, getDomain, getObjectName, getPrincipal, getRealmPath, getRealmSuffix, getServer, getType, getValidate, hasMessageDigest, hasResourcePermission, hasRole, hasUserDataPermission, init, main, postDeregister, postRegister, preDeregister, preRegister, removeLifecycleListener, removePropertyChangeListener, setAllRolesMode, setContainer, setController, setDigest, setDigestEncoding, setRealmPath, setValidateprotected final String info
protected static final String name
public String getInfo()
<description>/<version>.getInfo in interface org.apache.catalina.RealmgetInfo in class org.apache.catalina.realm.RealmBasepublic Principal authenticate(String username, String credentials)
null.authenticate in interface org.apache.catalina.Realmauthenticate in class org.apache.catalina.realm.RealmBaseusername - Username of the Principal to look upcredentials - Password or other credentials to use in
authenticating this usernameprotected String getName()
getName in class org.apache.catalina.realm.RealmBaseprotected String getPassword(String username)
getPassword in class org.apache.catalina.realm.RealmBaseprotected Principal getPrincipal(String username)
getPrincipal in class org.apache.catalina.realm.RealmBaseprotected Map<String,org.apache.catalina.realm.GenericPrincipal> getPrincipals()
public void start()
throws org.apache.catalina.LifecycleException
start in interface org.apache.catalina.Lifecyclestart in class org.apache.catalina.realm.RealmBaseorg.apache.catalina.LifecycleException - if this component detects a fatal error
that prevents it from being startedpublic void stop()
throws org.apache.catalina.LifecycleException
stop in interface org.apache.catalina.Lifecyclestop in class org.apache.catalina.realm.RealmBaseorg.apache.catalina.LifecycleException - if this component detects a fatal error
that needs to be reportedCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.