Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:

Go Back   Caucho Forums > Resin

Thread Tools Display Modes
Old 01-20-2012, 11:47 PM
jigzat jigzat is offline
Join Date: Jun 2011
Posts: 40
Default Authorization Roles??

Hello everyone, happy new year to all.

I'm taking my chances in posting here since it takes ages for someone to answer... I know resin users are a very small group and I'm not paying yet for a license to get official support but still is frustrating .

I implemented a simple CustomAuthenticator and now I am trying to restrict access to some parts of my webapp. I'm aware of the allow deny and IfUserInRole resin tags but I have no idea of where to implement role verification.

In the CustomAuthenticator abstract class there is a method named IsUserInRole() but it seems to work for authentication and not for authorization.

Does anyone have any idea about this?
Reply With Quote
Old 01-23-2012, 05:10 PM
ferg ferg is offline
Join Date: Aug 2009
Posts: 190

The authentication is handled by the <resin:Allow> and the predicates. So you'd use something like:

<web-app xmlns:resin="urn:java:com.caucho.resin">


<resin:Allow regexp="^/foo">
<resin:IfUserInRole role="my-role"/>

The IfUserInRole will ask your authenticator if the current user belongs to the role (by calling the isUserInRole method.)
Reply With Quote
Old 01-25-2012, 05:06 PM
jigzat jigzat is offline
Join Date: Jun 2011
Posts: 40

Thank you very very much for your answer. Now it makes sense.
Reply With Quote

authorization, ifuserinrole

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:34 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.