RE: Custom org.apache.catalina.authenticator

2002-08-13 Thread Chaudhuri, Hiran

Hi there.

I also am interested in exchanging the authenticator. But I could not find
the properties file mentioned below in Tomcat 4.1.8. However I found the
NonLoginAuthenticator (exactly what I was trying to do), and a properties
file in org.apache.catalina.startup.

Do I understand correctly that this authenticator is activated just by
specifying
auth-methodNONE/auth-method
in web.xml?

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimerstra?e 11
80687 Munchen
Germany
[EMAIL PROTECTED]
Phone +49-89-54742-134
Fax   +49-6151-9234-5134

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 2:52 AM
 To: Tomcat Users List
 Subject: Re: Custom org.apache.catalina.authenticator
 
 
 
 
 On Mon, 29 Jul 2002, Tim McLaughlin wrote:
 
  Date: Mon, 29 Jul 2002 16:00:17 -0700
  From: Tim McLaughlin [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Custom org.apache.catalina.authenticator
 
  Hello,
 
  The Question:
  How do I specify a class other than
  org.catalina.authenticator.BasicAuthenticator to handle Basic
  authentication?
 
 
 There is a properties file in the org.apache.catalina.authenticator
 package that defines the mapping of authentication method to 
 classname.
 You would need to customize this file in
 $CATALINA_HOME/server/lib/catalina.jar.
 
 Or, an easier approach would be to copy your customized 
 version of this
 file into the
 $CATALINA_HOME/server/classes/org/apache/catalina/authenticato
 r directory
 (which you'd have to create).  This works because the Catalina class
 loaders load from the classes directory before they load 
 from JAR files
 in the corresponding lib directory -- this works both for the server
 class loader (server/classes before server/lib), the common 
 class loader
 (common/classes before common/lib) and the webapp class loader
 (WEB-INF/classes before WEB-INF/lib).
 
 Craig
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Custom org.apache.catalina.authenticator

2002-07-30 Thread Tim McLaughlin


On Monday, July 29, 2002, at 05:51 , Craig R. McClanahan wrote:

 On Mon, 29 Jul 2002, Tim McLaughlin wrote:

 The Question:
 How do I specify a class other than
 org.catalina.authenticator.BasicAuthenticator to handle Basic
 authentication?

 There is a properties file in the org.apache.catalina.authenticator
 package that defines the mapping of authentication method to classname.
 You would need to customize this file in
 $CATALINA_HOME/server/lib/catalina.jar.

 Or, an easier approach would be to copy your customized version of this
 file into the
 $CATALINA_HOME/server/classes/org/apache/catalina/authenticator 
 directory
 (which you'd have to create).  This works because the Catalina class
 loaders load from the classes directory before they load from 
 JAR files
 in the corresponding lib directory -- this works both for the server
 class loader (server/classes before server/lib), the common class 
 loader
 (common/classes before common/lib) and the webapp class loader
 (WEB-INF/classes before WEB-INF/lib).

The only properties file I found in 
src/share/org/apache/catalina/authenticator directory was for the 
LocalStrings translations.  However, the package.html file 
mentioned the 
src/share/org/apache/catalina/startup/Authenticators.properties 
file.

I have created a copy in $CATALINA_HOME/server/webapps/pc-
manager/WEB-
INF/classes/org/apache/catalina/startup/Authenticator.properties 
and specified my custom class, PerContextBasicAuthenticator for 
BASIC.

I then restarted tomcat, but the log shows that it is not using my 
class (debug=3), instead using the default class.  So I moved the 
new file to 
$CATALINA_HOME/server/classes/org/apache/catalina/startup/Authenticator.properties 
and then it works.

When I specify a class to handle BASIC authentication, do I have to 
do it server-wide, or can I do it on a per-context basis?

Thanks,
Tim


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Custom org.apache.catalina.authenticator

2002-07-29 Thread Craig R. McClanahan



On Mon, 29 Jul 2002, Tim McLaughlin wrote:

 Date: Mon, 29 Jul 2002 16:00:17 -0700
 From: Tim McLaughlin [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Custom org.apache.catalina.authenticator

 Hello,

 The Question:
 How do I specify a class other than
 org.catalina.authenticator.BasicAuthenticator to handle Basic
 authentication?


There is a properties file in the org.apache.catalina.authenticator
package that defines the mapping of authentication method to classname.
You would need to customize this file in
$CATALINA_HOME/server/lib/catalina.jar.

Or, an easier approach would be to copy your customized version of this
file into the
$CATALINA_HOME/server/classes/org/apache/catalina/authenticator directory
(which you'd have to create).  This works because the Catalina class
loaders load from the classes directory before they load from JAR files
in the corresponding lib directory -- this works both for the server
class loader (server/classes before server/lib), the common class loader
(common/classes before common/lib) and the webapp class loader
(WEB-INF/classes before WEB-INF/lib).

Craig


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]