I'm confused. I have Realm authentication set-up. I haven't heard about
the Authenticator API? Is that configurable from the server.xml as well??
fern
> You would need to sublcass whichever authenticator class you are using
> (such as
> org.apache.catalina.authenticator.FormAuthenticator) and override the
> authenticate()
> method, something like this:
>
> public boolean authenticate(HttpRequest request,
> HttpResponse response, LoginConfig config) {
>
> if (!super.authenticate(request, response, config))
> return (false);
> MyPrincipal principal =
> (MyPrincipal) request.getUserPrincipal();
> if (principal == null) {
> // We are asking for the form login page
> return (true);
> } else {
> // Copy the stuff we need into the session
> HttpSession session =
> ((HttpServletRequest) request.getRequest).getSession();
> session.setAttribute("userStatus", principal.getStatus());
> ...
> return (true);
> }
>
> }
>
> Note that the attributes you save need to be JDK classes like String,
> because the
> user classes you store in the server directory are not visible to web
> apps.
>
> >
> > thank you :):):)
> >
> > fern
> >
>
> Craig McClanahan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]