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-catalina/catalina/src/share/org/apache/catalina/realm JNDIRealm.java
Date Tue, 19 Nov 2002 01:27:59 GMT
amyroh      2002/11/18 17:27:59

  Modified:    catalina/src/share/org/apache/catalina/realm JNDIRealm.java
  Log:
  Port change to configure how JNDI should handle referrals returned by the server.
  
  Revision  Changes    Path
  1.3       +31 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
  
  Index: JNDIRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JNDIRealm.java	12 Nov 2002 20:09:29 -0000	1.2
  +++ JNDIRealm.java	19 Nov 2002 01:27:59 -0000	1.3
  @@ -247,6 +247,14 @@
       
       
       /**
  +     * 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.
        */
       protected String userBase = "";
  @@ -469,6 +477,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() {
  @@ -1355,6 +1380,8 @@
               env.put(Context.SECURITY_AUTHENTICATION, authentication);
           if (protocol != null)
               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