Framework Serveur J2EE ACube V3.1.0
CLASSE PRECEDANTE CLASSE SUIVANTE
SOMMAIRE: ATTR CONSTR METH DETAIL: ATTR CONSTR METH

acube.framework.clavierVirtuel.realm
Classe JNDIRealm
java.lang.Object
  org.apache.catalina.realm.RealmBase
      acube.framework.clavierVirtuel.realm.RealmBaseAcube
          acube.framework.clavierVirtuel.realm.JNDIRealm
Interfaces à implémenter:
org.apache.catalina.Lifecycle, MBeanRegistration, org.apache.catalina.Realm

public class JNDIRealm
hérite de RealmBaseAcube

Implementation of Realm that works with a directory server accessed via the Java Naming and Directory Interface (JNDI) APIs. The following constraints are imposed on the data structure in the underlying directory server:

TODO - Support connection pooling (including message format objects) so that authenticate() does not have to be synchronized.

WARNING - There is a reported bug against the Netscape provider code (com.netscape.jndi.ldap.LdapContextFactory) with respect to successfully authenticated a non-existing user. The report is here: http://issues.apache.org/bugzilla/show_bug.cgi?id=11210 . With luck, Netscape has updated their provider code and this is not an issue.

Author:
John Holman
Craig R. McClanahan
Version:
$Revision: 1.1 $ $Date: 2007-03-26 08:14:19 $

Sommaire des Attributs
private String
alternateURL
An alternate URL, to which, we should connect if connectionURL fails.
private String
authentication
The type of authentication to use
private int
connectionAttempt
The number of connection attempts.
private String
connectionName
The connection username for the server we will contact.
private String
connectionPassword
The connection password for the server we will contact.
private String
connectionURL
The connection URL for the server we will contact.
private DirContext
context
The directory context linking us to our directory server.
private String
contextFactory
The JNDI context factory used to acquire our InitialContext.
private int
curUserPattern
The current user pattern to be used for lookup and binding of a user.
static final String
DEREF_ALIASES
Constant that holds the NAME of the environment property for specifying the manner in which aliases should be dereferenced.
private String
derefAliases
How aliases should be dereferenced during search operations.
protected static final String
INFO
Descriptive information about this Realm implementation.
protected static final String
NAME
Descriptive information about this Realm implementation.
private String
protocol
The protocol that will be used in the communication with the directory server.
private String
referrals
How should we handle referrals?
private String
roleBase
The base element for role searches.
private MessageFormat
roleFormat
The MessageFormat object associated with the current roleSearch.
private String
roleName
The NAME of the attribute containing roles held elsewhere
private String
roleSearch
The message format used to select roles for a user, with "{0}" marking the spot where the distinguished NAME of the user goes.
private boolean
roleSubtree
Should we search the entire subtree for matching memberships?
private String
userBase
The base element for user searches.
private String
userPassword
The attribute NAME used to retrieve the user password.
private String
userPattern
The message format used to form the distinguished NAME of a user, with "{0}" marking the spot where the specified username goes.
private String[]
userPatternArray
A string of LDAP user patterns or paths, ":"-separated These will be used to form the distinguished NAME of a user, with "{0}" marking the spot where the specified username goes.
private MessageFormat[]
userPatternFormatArray
An array of MessageFormat objects associated with the current userPatternArray.
private String
userRoleName
The NAME of an attribute in the user's entry containing roles for that user
private String
userSearch
The message format used to search for a user, with "{0}" marking the spot where the username goes.
private MessageFormat
userSearchFormat
The MessageFormat object associated with the current userSearch.
private boolean
userSubtree
Should we search the entire subtree for matching users?
Attributs hérités de l'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
Sommaire des Constructeurs
Sommaire des Méthodes
private ArrayList
addAttributeValues(String attrId, Attributes attrs, ArrayList values)
Add values of a specified attribute to a list
Principal
authenticate(String username, String credentials)
{@inheritDoc}
synchronized Principal
authenticate(DirContext context, String username, String credentials)
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
protected boolean
bindAsUser(DirContext context, User user, String credentials)
Check credentials by binding to the directory as the user
protected boolean
checkCredentials(DirContext context, User user, String credentials)
Check whether the given User can be authenticated with the given credentials.
protected void
close(DirContext context)
Close any open connection to the directory server for this Realm.
protected boolean
compareCredentials(DirContext context, User info, String credentials)
Check whether the credentials presented by the user match those retrieved from the directory.
protected String
doRFC2254Encoding(String inString)
Given an LDAP search string, returns the string with certain characters escaped according to RFC 2254 guidelines.
String
getAlternateURL()
Getter for property alternateURL.
private String
getAttributeValue(String attrId, Attributes attrs)
Return a String representing the value of the specified attribute.
String
getAuthentication()
Return the type of authentication to use.
String
getConnectionName()
Return the connection username for this Realm.
String
getConnectionPassword()
Return the connection password for this Realm.
String
getConnectionURL()
Return the connection URL for this Realm.
String
getContextFactory()
Return the JNDI context factory for this Realm.
String
getDerefAliases()
Return the derefAliases setting to be used.
protected Hashtable
getDirectoryContextEnvironment()
Create our directory context configuration.
protected String
getName()
{@inheritDoc}
protected String
getPassword(String username)
{@inheritDoc}
protected Principal
getPrincipal(String username)
{@inheritDoc}
protected synchronized Principal
getPrincipal(DirContext context, String username)
Return the Principal associated with the given user NAME.
String
getProtocol()
Return the protocol to be used.
String
getReferrals()
Returns the current settings for handling JNDI referrals.
String
getRoleBase()
Return the base element for role searches.
String
getRoleName()
Return the role NAME attribute NAME for this Realm.
protected List
getRoles(DirContext context, User user)
Return a List of roles associated with the given User.
String
getRoleSearch()
Return the message format pattern for selecting roles in this Realm.
boolean
getRoleSubtree()
Return the "search subtree for roles" flag.
protected User
getUser(DirContext context, String username)
Return a User object containing information about the user with the specified username, if found in the directory; otherwise return null.
String
getUserBase()
Return the base element for user searches.
protected User
getUserByPattern(DirContext context, String username, String[] attrIds)
Use the UserPattern configuration attribute to locate the directory entry for the user with the specified username and return a User object; otherwise return null.
protected User
getUserBySearch(DirContext context, String username, String[] attrIds)
Search the directory to return a User object containing information about the user with the specified username, if found in the directory; otherwise return null.
String
getUserPassword()
Return the password attribute used to retrieve the user password.
String
getUserPattern()
Return the message format pattern for selecting users in this Realm.
String
getUserRoleName()
Return the user role NAME attribute NAME for this Realm.
String
getUserSearch()
Return the message format pattern for selecting users in this Realm.
boolean
getUserSubtree()
Return the "search subtree for users" flag.
protected DirContext
open()
Open (if necessary) and return a connection to the configured directory server for this Realm.
protected String[]
parseUserPatternString(String userPatternString)
Given a string containing LDAP patterns for user locations (separated by parentheses in a pseudo-LDAP search string format - "(location1)(location2)", returns an array of those paths.
protected void
release(DirContext context)
Release our use of this connection so that it can be recycled.
void
setAlternateURL(String alternateURL)
Setter for property alternateURL.
void
setAuthentication(String authentication)
Set the type of authentication to use.
void
setConnectionName(String connectionName)
Set the connection username for this Realm.
void
setConnectionPassword(String connectionPassword)
Set the connection password for this Realm.
void
setConnectionURL(String connectionURL)
Set the connection URL for this Realm.
void
setContextFactory(String contextFactory)
Set the JNDI context factory for this Realm.
void
setDerefAliases(String derefAliases)
Set the value for derefAliases to be used when searching the directory.
void
setProtocol(String protocol)
Set the protocol for this Realm.
void
setReferrals(String referrals)
How do we handle JNDI referrals?
void
setRoleBase(String roleBase)
Set the base element for role searches.
void
setRoleName(String roleName)
Set the role NAME attribute NAME for this Realm.
void
setRoleSearch(String roleSearch)
Set the message format pattern for selecting roles in this Realm.
void
setRoleSubtree(boolean roleSubtree)
Set the "search subtree for roles" flag.
void
setUserBase(String userBase)
Set the base element for user searches.
void
setUserPassword(String userPassword)
Set the password attribute used to retrieve the user password.
void
setUserPattern(String userPattern)
Set the message format pattern for selecting users in this Realm.
void
setUserRoleName(String userRoleName)
Set the user role NAME attribute NAME for this Realm.
void
setUserSearch(String userSearch)
Set the message format pattern for selecting users in this Realm.
void
setUserSubtree(boolean userSubtree)
Set the "search subtree for users" flag.
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.
Méthodes héritées de la classe acube.framework.clavierVirtuel.realm.RealmBaseAcube
authenticate
Méthodes héritées de la classe org.apache.catalina.realm.RealmBase
addLifecycleListener, addPropertyChangeListener, authenticate, authenticate, authenticate, authenticate, backgroundProcess, destroy, Digest, findLifecycleListeners, findSecurityConstraints, getAllRolesMode, getContainer, getController, getDigest, getDigestEncoding, getDomain, getInfo, getObjectName, getType, getValidate, hasResourcePermission, hasRole, hasUserDataPermission, init, main, postDeregister, postRegister, preDeregister, preRegister, removeLifecycleListener, removePropertyChangeListener, setAllRolesMode, setContainer, setController, setDigest, setDigestEncoding, setValidate, start, stop
Méthodes héritées de la classe java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Méthodes héritées de l'interface org.apache.catalina.Lifecycle
addLifecycleListener, findLifecycleListeners, removeLifecycleListener, start, stop
Méthodes héritées de l'interface org.apache.catalina.Realm
addPropertyChangeListener, authenticate, authenticate, authenticate, authenticate, backgroundProcess, findSecurityConstraints, getContainer, getInfo, hasResourcePermission, hasRole, hasUserDataPermission, removePropertyChangeListener, setContainer
Méthodes héritées de l'interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
Détail des Attributs
DEREF_ALIASES
public static final String DEREF_ALIASES
Constant that holds the NAME of the environment property for specifying the manner in which aliases should be dereferenced.

INFO
protected static final String INFO
Descriptive information about this Realm implementation.

NAME
protected static final String NAME
Descriptive information about this Realm implementation.

userPatternFormatArray
private MessageFormat[] userPatternFormatArray
An array of MessageFormat objects associated with the current userPatternArray.

authentication
private String authentication
The type of authentication to use

connectionName
private String connectionName
The connection username for the server we will contact.

connectionPassword
private String connectionPassword
The connection password for the server we will contact.

connectionURL
private String connectionURL
The connection URL for the server we will contact.

context
private DirContext context
The directory context linking us to our directory server.

contextFactory
private String contextFactory
The JNDI context factory used to acquire our InitialContext. By default, assumes use of an LDAP server using the standard JNDI LDAP provider.

derefAliases
private String derefAliases
How aliases should be dereferenced during search operations.

protocol
private String protocol
The protocol that will be used in the communication with the directory server.

referrals
private String referrals
How should we handle referrals? Microsoft Active Directory can't handle the default case, so an application authenticating against AD must set referrals to "follow".

userBase
private String userBase
The base element for user searches.

userSearch
private String userSearch
The message format used to search for a user, with "{0}" marking the spot where the username goes.

userSearchFormat
private MessageFormat userSearchFormat
The MessageFormat object associated with the current userSearch.

userSubtree
private boolean userSubtree
Should we search the entire subtree for matching users?

userPassword
private String userPassword
The attribute NAME used to retrieve the user password.

userPatternArray
private String[] userPatternArray
A string of LDAP user patterns or paths, ":"-separated These will be used to form the distinguished NAME of a user, with "{0}" marking the spot where the specified username goes. This is similar to userPattern, but allows for multiple searches for a user.

userPattern
private String userPattern
The message format used to form the distinguished NAME of a user, with "{0}" marking the spot where the specified username goes.

roleBase
private String roleBase
The base element for role searches.

roleFormat
private MessageFormat roleFormat
The MessageFormat object associated with the current roleSearch.

userRoleName
private String userRoleName
The NAME of an attribute in the user's entry containing roles for that user

roleName
private String roleName
The NAME of the attribute containing roles held elsewhere

roleSearch
private String roleSearch
The message format used to select roles for a user, with "{0}" marking the spot where the distinguished NAME of the user goes.

roleSubtree
private boolean roleSubtree
Should we search the entire subtree for matching memberships?

alternateURL
private String alternateURL
An alternate URL, to which, we should connect if connectionURL fails.

connectionAttempt
private int connectionAttempt
The number of connection attempts. If greater than zero we use the alternate url.

curUserPattern
private int curUserPattern
The current user pattern to be used for lookup and binding of a user.
Détail des Constructeurs
JNDIRealm
public JNDIRealm()
Détail des méthodes
getAuthentication
public String getAuthentication()
Return the type of authentication to use.
Retours:
the type of authentication to use.

setAuthentication
public void setAuthentication(String authentication)
Set the type of authentication to use.
Paramètres:
authentication - The authentication

getConnectionName
public String getConnectionName()
Return the connection username for this Realm.
Retours:
the connection username for this Realm.

setConnectionName
public void setConnectionName(String connectionName)
Set the connection username for this Realm.
Paramètres:
connectionName - The new connection username

getConnectionPassword
public String getConnectionPassword()
Return the connection password for this Realm.
Retours:
the connection password for this Realm.

setConnectionPassword
public void setConnectionPassword(String connectionPassword)
Set the connection password for this Realm.
Paramètres:
connectionPassword - The new connection password

getConnectionURL
public String getConnectionURL()
Return the connection URL for this Realm.
Retours:
the connection URL for this Realm.

setConnectionURL
public void setConnectionURL(String connectionURL)
Set the connection URL for this Realm.
Paramètres:
connectionURL - The new connection URL

getContextFactory
public String getContextFactory()
Return the JNDI context factory for this Realm.
Retours:
the JNDI context factory for this Realm.

setContextFactory
public void setContextFactory(String contextFactory)
Set the JNDI context factory for this Realm.
Paramètres:
contextFactory - The new context factory

getDerefAliases
public String getDerefAliases()
Return the derefAliases setting to be used.
Retours:
the derefAliases setting to be used.

setDerefAliases
public void setDerefAliases(String derefAliases)
Set the value for derefAliases to be used when searching the directory.
Paramètres:
derefAliases - New value of property derefAliases.

getProtocol
public String getProtocol()
Return the protocol to be used.
Retours:
the protocol to be used.

setProtocol
public void setProtocol(String protocol)
Set the protocol for this Realm.
Paramètres:
protocol - The new protocol.

getReferrals
public String getReferrals()
Returns the current settings for handling JNDI referrals.
Retours:
the current settings for handling JNDI referrals.

setReferrals
public void setReferrals(String referrals)
How do we handle JNDI referrals? ignore, follow, or throw (see javax.naming.Context.REFERRAL for more information).
Paramètres:
referrals - the referrals to set

getUserBase
public String getUserBase()
Return the base element for user searches.
Retours:
the base element for user searches.

setUserBase
public void setUserBase(String userBase)
Set the base element for user searches.
Paramètres:
userBase - The new base element

getUserSearch
public String getUserSearch()
Return the message format pattern for selecting users in this Realm.
Retours:
the message format pattern for selecting users in this Realm.

setUserSearch
public void setUserSearch(String userSearch)
Set the message format pattern for selecting users in this Realm.
Paramètres:
userSearch - The new user search pattern

getUserSubtree
public boolean getUserSubtree()
Return the "search subtree for users" flag.
Retours:
the "search subtree for users" flag.

setUserSubtree
public void setUserSubtree(boolean userSubtree)
Set the "search subtree for users" flag.
Paramètres:
userSubtree - The new search flag

getUserRoleName
public String getUserRoleName()
Return the user role NAME attribute NAME for this Realm.
Retours:
the user role NAME attribute NAME for this Realm.

setUserRoleName
public void setUserRoleName(String userRoleName)
Set the user role NAME attribute NAME for this Realm.
Paramètres:
userRoleName - The new userRole NAME attribute NAME

getRoleBase
public String getRoleBase()
Return the base element for role searches.
Retours:
the base element for role searches.

setRoleBase
public void setRoleBase(String roleBase)
Set the base element for role searches.
Paramètres:
roleBase - The new base element

getRoleName
public String getRoleName()
Return the role NAME attribute NAME for this Realm.
Retours:
the role NAME attribute NAME for this Realm.

setRoleName
public void setRoleName(String roleName)
Set the role NAME attribute NAME for this Realm.
Paramètres:
roleName - The new role NAME attribute NAME

getRoleSearch
public String getRoleSearch()
Return the message format pattern for selecting roles in this Realm.
Retours:
the message format pattern for selecting roles in this Realm.

setRoleSearch
public void setRoleSearch(String roleSearch)
Set the message format pattern for selecting roles in this Realm.
Paramètres:
roleSearch - The new role search pattern

getRoleSubtree
public boolean getRoleSubtree()
Return the "search subtree for roles" flag.
Retours:
the "search subtree for roles" flag.

setRoleSubtree
public void setRoleSubtree(boolean roleSubtree)
Set the "search subtree for roles" flag.
Paramètres:
roleSubtree - The new search flag

getUserPassword
public String getUserPassword()
Return the password attribute used to retrieve the user password.
Retours:
the password attribute used to retrieve the user password.

setUserPassword
public void setUserPassword(String userPassword)
Set the password attribute used to retrieve the user password.
Paramètres:
userPassword - The new password attribute

getUserPattern
public String getUserPattern()
Return the message format pattern for selecting users in this Realm.
Retours:
the message format pattern for selecting users in this Realm.

setUserPattern
public void setUserPattern(String userPattern)
Set the message format pattern for selecting users in this Realm. This may be one simple pattern, or multiple patterns to be tried, separated by parentheses. (for example, either "cn={0}", or "(cn={0})(cn={0},o=myorg)" Full LDAP search strings are also supported, but only the "OR", "|" syntax, so "(|(cn={0})(cn={0},o=myorg))" is also valid. Complex search strings with &, etc are NOT supported.
Paramètres:
userPattern - The new user pattern

getAlternateURL
public String getAlternateURL()
Getter for property alternateURL.
Retours:
Value of property alternateURL.

setAlternateURL
public void setAlternateURL(String alternateURL)
Setter for property alternateURL.
Paramètres:
alternateURL - New value of property alternateURL.

authenticate
public Principal authenticate(String username,
                              String credentials)
{@inheritDoc}
Spécifié par:
authenticate in interface org.apache.catalina.Realm
Dépacées:

authenticate
public synchronized Principal authenticate(DirContext context,
                                           String username,
                                           String credentials)
                                    throws NamingException
Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.
Paramètres:
context - The directory context
username - Username of the Principal to look up
credentials - Password or other credentials to use in authenticating this username
Retours:
the Principal associated with the specified username and credentials
Exceptions:
NamingException - if a directory server error occurs

getUser
protected User getUser(DirContext context,
                       String username)
                throws NamingException
Return a User object containing information about the user with the specified username, if found in the directory; otherwise return null. If the userPassword configuration attribute is specified, the value of that attribute is retrieved from the user's directory entry. If the userRoleName configuration attribute is specified, all values of that attribute are retrieved from the directory entry.
Paramètres:
context - The directory context
username - Username to be looked up
Retours:
the userPassword configuration attribute
Exceptions:
NamingException - if a directory server error occurs

getUserByPattern
protected User getUserByPattern(DirContext context,
                                String username,
                                String[] attrIds)
                         throws NamingException
Use the UserPattern configuration attribute to locate the directory entry for the user with the specified username and return a User object; otherwise return null.
Paramètres:
context - The directory context
username - The username
attrIds - String[]containing names of attributes to retrieve.
Retours:
the UserPattern configuration attribute
Exceptions:
NamingException - if a directory server error occurs

getUserBySearch
protected User getUserBySearch(DirContext context,
                               String username,
                               String[] attrIds)
                        throws NamingException
Search the directory to return a User object containing information about the user with the specified username, if found in the directory; otherwise return null.
Paramètres:
context - The directory context
username - The username
attrIds - String[]containing names of attributes to retrieve.
Retours:
the user with the specified username
Exceptions:
NamingException - if a directory server error occurs

checkCredentials
protected boolean checkCredentials(DirContext context,
                                   User user,
                                   String credentials)
                            throws NamingException
Check whether the given User can be authenticated with the given credentials. If the userPassword configuration attribute is specified, the credentials previously retrieved from the directory are compared explicitly with those presented by the user. Otherwise the presented credentials are checked by binding to the directory as the user.
Paramètres:
context - The directory context
user - The User to be authenticated
credentials - The credentials presented by the user
Retours:
if the given User can be authenticated with the given credentials
Exceptions:
NamingException - if a directory server error occurs

compareCredentials
protected boolean compareCredentials(DirContext context,
                                     User info,
                                     String credentials)
                              throws NamingException
Check whether the credentials presented by the user match those retrieved from the directory.
Paramètres:
context - The directory context
credentials - Authentication credentials
Retours:
if the credentials presented by the user match those retrieved from the directory.
Exceptions:
NamingException - if a directory server error occurs

bindAsUser
protected boolean bindAsUser(DirContext context,
                             User user,
                             String credentials)
                      throws NamingException
Check credentials by binding to the directory as the user
Paramètres:
context - The directory context
user - The User to be authenticated
credentials - Authentication credentials
Retours:
if credentials by binding to the directory as the user
Exceptions:
NamingException - if a directory server error occurs

getRoles
protected List getRoles(DirContext context,
                        User user)
                 throws NamingException
Return a List of roles associated with the given User. Any roles present in the user's directory entry are supplemented by a directory search. If no roles are associated with this user, a zero-length List is returned.
Paramètres:
context - The directory context we are searching
user - The User to be checked
Retours:
a List of roles associated with the given User
Exceptions:
NamingException - if a directory server error occurs

getAttributeValue
private String getAttributeValue(String attrId,
                                 Attributes attrs)
                          throws NamingException
Return a String representing the value of the specified attribute.
Paramètres:
attrId - Attribute NAME
attrs - Attributes containing the required value
Retours:
a String representing the value of the specified attribute.
Exceptions:
NamingException - if a directory server error occurs

addAttributeValues
private ArrayList addAttributeValues(String attrId,
                                     Attributes attrs,
                                     ArrayList values)
                              throws NamingException
Add values of a specified attribute to a list
Paramètres:
attrId - Attribute NAME
attrs - Attributes containing the new values
values - ArrayList containing values found so far
Exceptions:
NamingException - if a directory server error occurs

close
protected void close(DirContext context)
Close any open connection to the directory server for this Realm.
Paramètres:
context - The directory context to be closed

getName
protected String getName()
{@inheritDoc}
Dépacées:
getName in class org.apache.catalina.realm.RealmBase

getPassword
protected String getPassword(String username)
{@inheritDoc}
Dépacées:
getPassword in class org.apache.catalina.realm.RealmBase

getPrincipal
protected Principal getPrincipal(String username)
{@inheritDoc}
Dépacées:
getPrincipal in class org.apache.catalina.realm.RealmBase

getPrincipal
protected synchronized Principal getPrincipal(DirContext context,
                                              String username)
                                       throws NamingException
Return the Principal associated with the given user NAME.
Paramètres:
context - the context
username - the user NAME
Retours:
the Principal associated with the given user NAME.
Exceptions:
NamingException - if Error occurs

open
protected DirContext open()
                   throws NamingException
Open (if necessary) and return a connection to the configured directory server for this Realm.
Retours:
a connection to the configured directory server for this Realm.
Exceptions:
NamingException - if a directory server error occurs

getDirectoryContextEnvironment
protected Hashtable getDirectoryContextEnvironment()
Create our directory context configuration.
Retours:
java.util.Hashtable the configuration for the directory context.

release
protected void release(DirContext context)
Release our use of this connection so that it can be recycled.
Paramètres:
context - The directory context to release

start
public void start()
           throws org.apache.catalina.LifecycleException
Prepare for active use of the public methods of this Component.
Spécifié par:
start in interface org.apache.catalina.Lifecycle
Dépacées:
start in class org.apache.catalina.realm.RealmBase
Exceptions:
org.apache.catalina.LifecycleException - if this component detects a fatal error that prevents it from being started

stop
public void stop()
          throws org.apache.catalina.LifecycleException
Gracefully shut down active use of the public methods of this Component.
Spécifié par:
stop in interface org.apache.catalina.Lifecycle
Dépacées:
stop in class org.apache.catalina.realm.RealmBase
Exceptions:
org.apache.catalina.LifecycleException - if this component detects a fatal error that needs to be reported

parseUserPatternString
protected String[] parseUserPatternString(String userPatternString)
Given a string containing LDAP patterns for user locations (separated by parentheses in a pseudo-LDAP search string format - "(location1)(location2)", returns an array of those paths. Real LDAP search strings are supported as well (though only the "|" "OR" type).
Paramètres:
userPatternString - - a string LDAP search paths surrounded by parentheses
Retours:
an array of paths

doRFC2254Encoding
protected String doRFC2254Encoding(String inString)
Given an LDAP search string, returns the string with certain characters escaped according to RFC 2254 guidelines. The character mapping is as follows: char -> Replacement --------------------------- * -> \2a ( -> \28 ) -> \29 \ -> \5c \0 -> \00
Paramètres:
inString - string to escape according to RFC 2254 guidelines
Retours:
String the escaped/encoded result

Framework Serveur J2EE ACube V3.1.0
CLASSE PRECEDANTE CLASSE SUIVANTE
SOMMAIRE: ATTR CONSTR METH DETAIL: ATTR CONSTR METH

Version 3.1.0 du 06/11/2009 / Etat : Validé
Cette création est mise à disposition selon le Contrat Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique disponible en ligne http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ ou par courrier postal à Creative Commons, 559 Nathan Abbott Way, Stanford,California 94305, USA.
Documentation generated by DocFlex