Fetch user roles after a successful forced binded ldap login.
Signed-off-by: JACQUES Francois <fjacques@murex.com>
This commit is contained in:
parent
8068aeead9
commit
1f75ab178c
|
@ -415,27 +415,30 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
return isAuthenticated();
|
||||
}
|
||||
|
||||
boolean authed = false;
|
||||
|
||||
if (_forceBindingLogin)
|
||||
{
|
||||
return bindingLogin(webUserName, webCredential);
|
||||
authed = bindingLogin(webUserName, webCredential);
|
||||
}
|
||||
|
||||
// This sets read and the credential
|
||||
UserInfo userInfo = getUserInfo(webUserName);
|
||||
|
||||
if (userInfo == null)
|
||||
{
|
||||
setAuthenticated(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
setCurrentUser(new JAASUserInfo(userInfo));
|
||||
|
||||
boolean authed = false;
|
||||
if (webCredential instanceof String)
|
||||
authed = credentialLogin(Credential.getCredential((String) webCredential));
|
||||
else
|
||||
authed = credentialLogin(webCredential);
|
||||
{
|
||||
// This sets read and the credential
|
||||
UserInfo userInfo = getUserInfo(webUserName);
|
||||
|
||||
if (userInfo == null)
|
||||
{
|
||||
setAuthenticated(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
setCurrentUser(new JAASUserInfo(userInfo));
|
||||
|
||||
if (webCredential instanceof String)
|
||||
authed = credentialLogin(Credential.getCredential((String) webCredential));
|
||||
else
|
||||
authed = credentialLogin(webCredential);
|
||||
}
|
||||
|
||||
//only fetch roles if authenticated
|
||||
if (authed)
|
||||
|
|
Loading…
Reference in New Issue