Merge remote-tracking branch 'origin/jetty-9.3.x'

This commit is contained in:
Jan Bartel 2016-03-11 23:05:53 +11:00
commit f4e91a5896
1 changed files with 22 additions and 19 deletions

View File

@ -415,32 +415,35 @@ 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)
getCurrentUser().fetchRoles();
return authed;
}
catch (UnsupportedCallbackException e)