Fair enough. We also extend RealmBase and just override hasRole(Principal principal, String role), which is the only place GenericPrincipal is referenced in RealmBase. We use our own storage mechanism for Roles.

http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java

As to moving server/lib/* to common/lib/*. Sounds scary to me :)

Yuri de Wit wrote:
Yes, in the spirit of "dont reinvent the wheel" I was trying to leverage as
much as possible from the catalina BaseRealm, but that implementation
requires GenericPrincipal to get the list of roles associated with the
principal.

Thanks for the pointer.

Any issues moving all the jar from server/lib to common/lib for a quick
workaround?

On 6/29/06, Jon Wingfield <[EMAIL PROTECTED]> wrote:

In addition, custom Realms merely need to create instances of Principal.
There is no requirement for them to extend GenericPrincipal.

Our Realm classes are deployed to server/lib
Our extension to Principal is deployed to common/lib

See the thread "Is custom realm using user/role data in webapp
possible?" from 26th May for more details.

HTH,

Jon

Nicholas Sushkin wrote:
>> "MyPrincipal cannot be resolve to a type"
>>
>> when trying the following:
>>
>> ((MyPrincipal)request.getUserPrincipal()).getDisplayName();
>
> Yuri,
>
> Josso implemented their own Principal that has additional properties.
You
> may want to poke around http://www.josso.org/developer-howto.html
>



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to