Caucho Forums  

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


Go Back   Caucho Forums > Resin

Reply
 
Thread Tools Display Modes
  #1  
Old 01-21-2012, 12:47 AM
jigzat jigzat is offline
Member
 
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
  #2  
Old 01-23-2012, 06:10 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default

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">

<mypkg:MyAuthenticator/>

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

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

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

Tags
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 11:45 AM.


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