Merge pull request #364 from hypnoce/fix_ldap_binded_login_9.3.x
9.3.x: Fetch user roles after a successful forced binded ldap login.
This commit is contained in:
commit
4bbc469f57
|
@ -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