JBoss Community

Using JBoss Negotiation on AS7

new comment by guillaume cornet View all comments on this document

@Tim H

 

 

You can acheive the same results in a 'cleaner' way, with the PropertiesRolesMappingProvider.

Just replace your 'RealmUsersRoles' login-module with :

 

<mapping>

    <mapping-module code="PropertiesRoles" type="role">

        <module-option name="rolesProperties" value="/path/to/users-roles-mapping.properties" />

    </mapping-module>

</mapping>

 

And the content of '/path/to/users-roles-mapping.properties' should be

username@DOMAIN=Users

username2@DOMAIN=Users

username3@DOMAIN=Users

 

 

 

An alternate solution is to use the 'SimpleRolesMappingProvider' mapping-module :

 

<mapping>

    <mapping-module code="SimpleRoles" type="role">

        <module-option name="username@DOMAIN" value="Users" />

        <module-option name="username2@DOMAIN" value="Users" />

        <module-option name="username3@DOMAIN" value="Users" />

    </mapping-module>

</mapping>

 

Cheers