David Haraburda wrote:

> Hello,
>
> I am in the process of migrating our web application to Tomcat 3.2.
> Currently I am looking at re-working our current method of
> authentication.  I noticed that in the server.xml file there is a note
> that says "You can plug more advanced authentication modules".  Since
> JDBCRealm will not work for us, I am assuming I need to write my own
> module/Realm class.  Is my assumption correct?

You've got it.  You will need to write a subclass of BaseInterceptor (for Tomcat
3.2) that behaves the way you need it to, and then configure that interceptor
into use through server.xml.

What I would do is start from the source for JDBCRealm and change what you need
to for where to look up usernames, passwords, and roles.

> What do I need to create
> my Realm class?  I looking for the "right way" to do this, since it
> looks like what we did before that worked with Tomcat 3.1, is now broken
> with 3.2.  I want to write whatever I need to write in a manner that
> will be compatible for future releases of Tomcat.  Sorry if I sound a
> bit confused -- I am :)
>

In 4.0, it's different -- you will write a subclass of
org.apache.catalina.realm.RealmBase to do what you need.  Again, you can start
from the existing JDBCRealm as an example.

>
> Thanks for any help,
>
> David
>

Craig McClanahan



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

Reply via email to