I've written in web.xml these role:
<xml version="1.0" encoding="UTF-8">
  | <web-app>
  | 
  |     <security-constraint>
  |             <web-resource-collection>
  |             <web-resource-name>Secure Content for 
administrators</web-resource-name>
  |             <url-pattern>/administrator/*</url-pattern>
  |         </web-resource-collection>
  |         <auth-constraint>
  |             <role-name>Administrators</role-name>
  |         </auth-constraint>
  |         <user-data-constraint>
  |             <transport-guarantee>NONE</transport-guarantee>
  |         </user-data-constraint>        
  |     </security-constraint>
  |     
  |     <security-constraint>
  |             <web-resource-collection>
  |             <web-resource-name>Secure Content for users</web-resource-name>
  |             <url-pattern>/user/*</url-pattern>
  |         </web-resource-collection>
  |         <auth-constraint>
  |             <role-name>Users</role-name>
  |         </auth-constraint>
  |         <user-data-constraint>
  |             <transport-guarantee>NONE</transport-guarantee>
  |         </user-data-constraint>        
  |     </security-constraint>  
  |     
  |     <login-config>
  |         <auth-method>BASIC</auth-method>
  |         <realm-name>The Restricted Zone</realm-name>
  |     </login-config>
  |     
  |     <security-role>
  |         <description>Role for the administrators</description>
  |         <role-name>Administrators</role-name>
  |     </security-role>
  |     <security-role>
  |         <description>Role for the users</description>
  |         <role-name>Users</role-name>
  |     </security-role> 
  |       
  | </web-app>
  | </xml>

But method isUserInRole(String) return me alwasy false...
There's something wrong?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952201#3952201

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3952201


_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to