Some bugfixes for the JndiLoginModule
git-svn-id: https://svn.libreccm.org/ccm/trunk@6270 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
3973c56df8
commit
a6ffe42ec1
|
|
@ -105,7 +105,7 @@ public class JndiLoginModule extends PasswordLoginModule implements LoginModule
|
|||
userAuthentication = UserAuthentication
|
||||
.retrieveForSSOlogin(getUsername());
|
||||
} catch (DataObjectNotFoundException ex) {
|
||||
return false;
|
||||
throw new FailedLoginException("User not found in LDAP.");
|
||||
}
|
||||
final boolean result = super.login();
|
||||
return result;
|
||||
|
|
@ -115,12 +115,10 @@ public class JndiLoginModule extends PasswordLoginModule implements LoginModule
|
|||
public boolean commit() throws LoginException {
|
||||
LOGGER.debug("Commit");
|
||||
|
||||
if (userAuthentication == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (userAuthentication != null) {
|
||||
final BigDecimal userId = userAuthentication.getUser().getID();
|
||||
subject.getPrincipals().add(new PartyPrincipal(userId));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -128,18 +126,18 @@ public class JndiLoginModule extends PasswordLoginModule implements LoginModule
|
|||
@Override
|
||||
public boolean abort() throws LoginException {
|
||||
LOGGER.debug("Aborting");
|
||||
if (userAuthentication == null) {
|
||||
return false;
|
||||
}
|
||||
// if (userAuthentication == null) {
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean logout() throws LoginException {
|
||||
LOGGER.debug("Logout");
|
||||
if (userAuthentication == null) {
|
||||
return false;
|
||||
}
|
||||
// if (userAuthentication == null) {
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue