|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.realm.RealmBase org.apache.catalina.realm.CombinedRealm
public class CombinedRealm
Realm implementation that contains one or more realms. Authentication is attempted for each realm in the order they were configured. If any realm authenticates the user then the authentication succeeds. When combining realms usernames should be unique across all combined realms.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.catalina.realm.RealmBase |
---|
RealmBase.AllRolesMode |
Field Summary | |
---|---|
protected java.util.List<Realm> |
realms
The list of Realms contained by this Realm. |
protected static StringManager |
sm
The string manager for this package. |
Fields inherited from class org.apache.catalina.realm.RealmBase |
---|
allRolesMode, container, containerLog, controller, digest, digestEncoding, domain, host, info, initialized, lifecycle, md, md5Encoder, md5Helper, mserver, oname, path, realmPath, started, support, type, validate, x509UsernameRetriever, x509UsernameRetrieverClassName |
Fields inherited from interface org.apache.catalina.Lifecycle |
---|
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT |
Constructor Summary | |
---|---|
CombinedRealm()
|
Method Summary | |
---|---|
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. |
void |
backgroundProcess()
Delegate the backgroundProcess call to all sub-realms. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static StringManager sm
protected java.util.List<Realm> realms
Constructor Detail |
---|
public CombinedRealm()
Method Detail |
---|
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 clientonce
- Unique (or supposedly unique) token which has been used
for this requestrealmName
- 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 void backgroundProcess()
backgroundProcess
in interface Realm
backgroundProcess
in class RealmBase
public 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
getName
in class 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
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |