[jboss-user] [Security & JAAS/JBoss] - request.isUserInRole(

carlosgyn do-not-reply at jboss.com
Mon Sep 25 09:29:49 EDT 2006


Hi,
I am not getting role an user, in my application. Where this the mistake? 
 I am making the authentication in LDAP and getting to bring user and roles her that he belongs. I am using Struts. 

===== web.xml==========
  <security-role>
    PV
    <role-name>WAR0001</role-name>
  </security-role>
  <security-role>
	RV
	<role-name>WAR0002</role-name>
  </security-role>

  <security-constraint>
       <web-resource-collection>
             <url-pattern>/cancelbill.do</url-pattern>
             <http-method>GET</http-method>
             <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
	<role-name>WAR0001</role-name>
	<role-name>WAR0002</role-name>
        </auth-constraint>
   </security-constraint>

======== jboss-web.xml ========
  <security-role>
    PV
   <group-name>WAR0001</group-name>
  </security-role>
  <security-role>
	RV
                <group-name>WAR0001</group-name>
  </security-role>

===== application.xml  ===========
  <security-role>
    PV
    <role-name>WAR0001</role-name>
  </security-role>
  <security-role>
	RV
	<role-name>WAR0002</role-name>
  </security-role>

=========== login.jsp  ========
   <html:form action="/authentication .do" focus="j_username" method="post" onsubmit="return validateLoginForm(this);">

The class authentication.action recovers user and yours roles or group.

why the reading of it  request.isUserInRole("WAR0001") returns null .

thank you very much. 



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

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



More information about the jboss-user mailing list