org.apache.catalina.realm
public class CombinedRealm extends RealmBase
RealmBase.AllRolesMode
Modifier and Type | Field and Description |
---|---|
protected java.util.List<Realm> |
realms
The list of Realms contained by this Realm.
|
protected static StringManager |
sm
The string manager for this package.
|
allRolesMode, container, containerLog, controller, digest, digestEncoding, domain, host, info, initialized, lifecycle, md, md5Encoder, md5Helper, mserver, oname, path, realmPath, started, support, type, validate
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
Constructor and Description |
---|
CombinedRealm() |
Modifier and Type | Method and Description |
---|---|
void |
addRealm(Realm theRealm)
Add a realm to the list of realms that will be used to authenticate
users.
|
java.security.Principal |
authenticate(java.lang.String username,
byte[] credentials)
Return the Principal associated with the specified username and
credentials, if there is one; otherwise return
null . |
java.security.Principal |
authenticate(java.lang.String username,
java.lang.String credentials)
Return the Principal associated with the specified username and
credentials, if there is one; otherwise return
null . |
java.security.Principal |
authenticate(java.lang.String username,
java.lang.String clientDigest,
java.lang.String once,
java.lang.String nc,
java.lang.String cnonce,
java.lang.String qop,
java.lang.String realmName,
java.lang.String md5a2)
Return the Principal associated with the specified username, which
matches the digest calculated using the given parameters using the
method described in RFC 2069; otherwise return
null . |
java.security.Principal |
authenticate(java.security.cert.X509Certificate[] certs)
Return the Principal associated with the specified chain of X509
client certificates.
|
protected java.lang.String |
getName()
Return a short name for this Realm implementation, for use in
log messages.
|
protected java.lang.String |
getPassword(java.lang.String username)
Return the password associated with the given principal's user name.
|
protected java.security.Principal |
getPrincipal(java.lang.String username)
Return the Principal associated with the given user name.
|
javax.management.ObjectName[] |
getRealms()
Return the set of Realms that this Realm is wrapping
|
void |
setContainer(Container container)
Set the Container with which this Realm has been associated.
|
void |
start()
Prepare for the beginning of active use of the public methods of this
component.
|
void |
stop()
Gracefully terminate the active use of the public methods of this
component.
|
addLifecycleListener, addPropertyChangeListener, backgroundProcess, destroy, digest, Digest, findLifecycleListeners, findSecurityConstraints, getAllRolesMode, getContainer, getController, getDigest, getDigest, getDigestEncoding, getDomain, getInfo, getObjectName, getPrincipal, getRealmPath, getRealmSuffix, getType, getValidate, hasMessageDigest, hasResourcePermission, hasRole, hasUserDataPermission, init, main, postDeregister, postRegister, preDeregister, preRegister, removeLifecycleListener, removePropertyChangeListener, setAllRolesMode, setController, setDigest, setDigestEncoding, setRealmPath, setValidate
protected static StringManager sm
protected java.util.List<Realm> realms
public void addRealm(Realm theRealm)
public javax.management.ObjectName[] getRealms()
public java.security.Principal authenticate(java.lang.String username, byte[] credentials)
null
.authenticate
in interface Realm
authenticate
in class RealmBase
username
- Username of the Principal to look upcredentials
- Password or other credentials to use in
authenticating this usernamepublic java.security.Principal authenticate(java.lang.String username, java.lang.String clientDigest, java.lang.String once, java.lang.String nc, java.lang.String cnonce, java.lang.String qop, java.lang.String realmName, java.lang.String md5a2)
null
.authenticate
in interface Realm
authenticate
in class RealmBase
username
- Username of the Principal to look upclientDigest
- Digest which has been submitted by the clientnOnce
- Unique (or supposedly unique) token which has been used
for this requestrealm
- Realm namemd5a2
- Second MD5 digest used to calculate the digest :
MD5(Method + ":" + uri)public java.security.Principal authenticate(java.lang.String username, java.lang.String credentials)
null
.authenticate
in interface Realm
authenticate
in class RealmBase
username
- Username of the Principal to look upcredentials
- Password or other credentials to use in
authenticating this usernamepublic void setContainer(Container container)
setContainer
in interface Realm
setContainer
in class RealmBase
container
- The associated Containerpublic void start() throws LifecycleException
start
in interface Lifecycle
start
in class RealmBase
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic void stop() throws LifecycleException
stop
in interface Lifecycle
stop
in class RealmBase
LifecycleException
- if this component detects a fatal error
that needs to be reportedpublic java.security.Principal authenticate(java.security.cert.X509Certificate[] certs)
null
.authenticate
in interface Realm
authenticate
in class RealmBase
certs
- Array of client certificates, with the first one in
the array being the certificate of the client itself.protected java.lang.String getName()
RealmBase
protected java.lang.String getPassword(java.lang.String username)
RealmBase
getPassword
in class RealmBase
protected java.security.Principal getPrincipal(java.lang.String username)
RealmBase
getPrincipal
in class RealmBase
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.