tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm JNDIRealm.java
Date Tue, 19 Nov 2002 01:26:38 GMT
amyroh      2002/11/18 17:26:38

  Modified:    catalina/src/share/org/apache/catalina/realm JNDIRealm.java
  Log:
  Add to configure how JNDI should handle referrals returned by the server.
  
  Submitted by Christopher Taylor <cstaylor@nanshu.com>.
  
  Revision  Changes    Path
  1.10      +34 -5     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
  
  Index: JNDIRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JNDIRealm.java	12 Nov 2002 01:13:37 -0000	1.9
  +++ JNDIRealm.java	19 Nov 2002 01:26:38 -0000	1.10
  @@ -237,11 +237,21 @@
        */
       protected static final String name = "JNDIRealm";
   
  +
       /**
        * The protocol that will be used in the communication with the directory server.
        */
       protected String protocol = null;
   
  +
  +    /**
  +     * 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".
  +     */
  +    protected String referrals = null;
  +    
  +    
       /**
        * The base element for user searches.
        */
  @@ -460,6 +470,23 @@
   
   
       /**
  +     * Returns the current settings for handling JNDI referrals.
  +     */
  +    public String getReferrals () {
  +        return referrals;
  +    }
  +
  +
  +    /**
  +     * How do we handle JNDI referrals? ignore, follow, or throw 
  +     * (see javax.naming.Context.REFERRAL for more information).
  +     */
  +    public void setReferrals (String referrals) {
  +        this.referrals = referrals;
  +    }
  +    
  +
  +    /**
        * Return the base element for user searches.
        */
       public String getUserBase() {
  @@ -1345,7 +1372,9 @@
           if (authentication != null)
               env.put(Context.SECURITY_AUTHENTICATION, authentication);
           if (protocol != null)
  -            env.put(Context.SECURITY_PROTOCOL, protocol);
  +            env.put(Context.SECURITY_PROTOCOL, protocol);   
  +        if (referrals != null)
  +            env.put(Context.REFERRAL, referrals);   
       
           context = new InitialDirContext(env);
           return (context);
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message