org.apache.catalina.realm
Class UserDatabaseRealm
- Lifecycle, MBeanRegistration, Realm
public class UserDatabaseRealm
Implementation of
Realm
that is based on an implementation of
UserDatabase
made available through the global JNDI resources
configured for this instance of Catalina. Set the
resourceName
parameter to the global JNDI resources name for the configured instance
of
UserDatabase
that we should consult.
Version:
- Craig R. McClanahan
- 4.1
protected UserDatabase | database - The
UserDatabase we will use to authenticate users
and identify associated roles.
|
protected String | info - Descriptive information about this Realm implementation.
|
protected static String | name - Descriptive information about this Realm implementation.
|
protected String | resourceName - The global JNDI name of the
UserDatabase resource
we will be utilizing.
|
container , controller , debug , digest , digestEncoding , domain , host , info , initialized , lifecycle , md , md5Encoder , md5Helper , mserver , oname , path , sm , started , support , type , validate |
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.
|
String | getResourceName() - Return the global JNDI name of the
UserDatabase resource
we will be using.
|
void | setResourceName(String resourceName) - Set the global JNDI name of the
UserDatabase resource
we will be using.
|
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.
|
Digest , addLifecycleListener , addPropertyChangeListener , authenticate , authenticate , authenticate , authenticate , destroy , digest , findLifecycleListeners , findSecurityConstraints , getContainer , getController , getDebug , getDigest , getDigest , getDigestEncoding , getDomain , getInfo , getName , getObjectName , getPassword , getPrincipal , getType , getValidate , hasMessageDigest , hasResourcePermission , hasRole , hasUserDataPermission , init , log , log , main , postDeregister , postRegister , preDeregister , preRegister , removeLifecycleListener , removePropertyChangeListener , setContainer , setController , setDebug , setDigest , setDigestEncoding , setValidate , start , stop |
database
protected UserDatabase database
The UserDatabase
we will use to authenticate users
and identify associated roles.
info
protected final String info
Descriptive information about this Realm implementation.
name
protected static final String name
Descriptive information about this Realm implementation.
resourceName
protected String resourceName
The global JNDI name of the UserDatabase
resource
we will be utilizing.
authenticate
public Principal authenticate(String username,
String credentials)
Return the Principal associated with the specified username and
credentials, if there is one; otherwise return null
.
- authenticate in interface Realm
- authenticate in interface RealmBase
username
- Username of the Principal to look upcredentials
- Password or other credentials to use in
authenticating this username
getInfo
public String getInfo()
Return descriptive information about this Realm implementation and
the corresponding version number, in the format
<description>/<version>
.
- getInfo in interface Realm
- getInfo in interface RealmBase
getName
protected String getName()
Return a short name for this Realm implementation.
- getName in interface RealmBase
getPassword
protected String getPassword(String username)
Return the password associated with the given principal's user name.
- getPassword in interface RealmBase
getPrincipal
protected Principal getPrincipal(String username)
Return the Principal associated with the given user name.
- getPrincipal in interface RealmBase
getResourceName
public String getResourceName()
Return the global JNDI name of the UserDatabase
resource
we will be using.
setResourceName
public void setResourceName(String resourceName)
Set the global JNDI name of the UserDatabase
resource
we will be using.
resourceName
- The new global JNDI name
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.