Hello,
the reference guide says that the SynchronizingLoginModule try to synchronize
authenticated user into portal store using portal identity modules. I follow from this
sentence, that it will only synchronize authenticated users. But i made other experience.
When my custom LoginModule delivers false, the synchronization occurs however. If the
custom LoginModule delivers false, then I want that the authentication fails. But on my
example, the authentication takes place and a user is created by the Sync-Module and the
portal shows the pages and portlets.
I have a custom login module like this one..
|
| public class CustomIdentityModule extends UsernamePasswordLoginModule {
| ..
| public boolean login() throws LoginException {
| super.loginOk = true/false;
| return true/false;
|
| }
| protected Group[] getRoleSets() throws LoginException {}
| ...
| }
|
the login-config.xml
|
| <login-module code = "org.login.CustomIdentityModule"
flag="requisite"
| <module-option
name="dsJndiName">java:/CSDS</module-option>
| <module-option name="principalsQuery">SELECT PASSWD FROM
USERS WHERE USERNAME=?</module-option>
| <module-option name="rolesQuery">SELECT userroles,
'Roles' FROM userroles where username =?</module-option>
| <!--
| <module-option
name="hashAlgorithm">MD5</module-option>
| <module-option
name="hashEncoding">HEX</module-option>
| -->
| <module-option
name="additionalRole">Authenticated</module-option>
| </login-module>
|
|
| <login-module
code="org.jboss.portal.identity.auth.SynchronizingLoginModule"
flag="optional">
| <module-option
name="synchronizeIdentity">true</module-option>
| <module-option
name="synchronizeRoles">true</module-option>
| <module-option
name="preserveRoles">true</module-option>
| <module-option
name="additionalRole">Authenticated</module-option>
| <module-option
name="defaultAssignedRole">User</module-option>
| <module-option
name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option
name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option
name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option
name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| </login-module>
|
|
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145953#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...