tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Kha <dant...@YorkU.CA>
Subject Re: Custom Realm Implementation
Date Fri, 01 Feb 2002 20:27:03 GMT

Hi,

That's because TC 4.0.1 (and 4.0.2b1, but not sure about 4.0.2b2) calls
the hasRole() method (in RealmBase) and that method checks to see if
the principal is an instance of GenericPrincipal.  If not, then access is
denied (which I think is what's happening to you).  You will need to
extend from GenericPrincipal or modify the hasRole() method.  I would
extend GenericPrincipal rather than modify hasRole().

Thanks,
dan
--
Development Team
Computing & Network Services
York University, Toronto, Canada

On Fri, 1 Feb 2002, Renato Romano wrote:

> I'm trying to write my own Realm but have some problems...
> MyRealm extends JDBCRealm, overrides the authenticate method(Connection,
> String, String)
> and returns a CustomPrincipal which is My own implementation of Principal;
>
> When I try to log in, a get a "User userName successfully authenticated"
> message on the log, but the browser shows me a 403 error (You are not
> allowed ...)
>
> Any idea ?
> Any document showing the process in details ?
> Thanks
>
> Renato
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message