Commit 092a8157 by Juho Juopperi

Fixed bug introduced in 7f68ac52

1 parent 8c3752b4
......@@ -79,16 +79,17 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
RealmBeanRemote authbean = BortalRealm.getAuthBean();
if (authbean == null) {
throw new LoginException("Error. Could not get authentication bean!");
throw new LoginException(
"Error. Could not get authentication bean!");
}
// Authenticate User
BortalRealm samplerealm = (BortalRealm) _currentRealm;
if (!authbean.authenticate(_username, new String(_password))) {
if (!authbean.authenticate(_username, new String(_passwd))) {
// Login fails
throw new LoginException((new StringBuilder())
.append("customrealm:Login Failed for user ")
.append(_username).toString());
.append(_username).toString());
}
// Login succeeds
......@@ -100,15 +101,17 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
try {
enumeration = samplerealm.getGroupNames(_username);
} catch (InvalidOperationException invalidoperationexception) {
throw new LoginException((new StringBuilder())
.append("An InvalidOperationException was thrown " +
" while calling getGroupNames() on the SampleRealm ")
.append(invalidoperationexception).toString());
throw new LoginException(
(new StringBuilder())
.append("An InvalidOperationException was thrown "
+ " while calling getGroupNames() on the SampleRealm ")
.append(invalidoperationexception).toString());
} catch (NoSuchUserException nosuchuserexception) {
throw new LoginException((new StringBuilder())
.append("A NoSuchUserException was thrown " +
" while calling getGroupNames() on the SampleRealm ")
.append(nosuchuserexception).toString());
throw new LoginException(
(new StringBuilder())
.append("A NoSuchUserException was thrown "
+ " while calling getGroupNames() on the SampleRealm ")
.append(nosuchuserexception).toString());
}
ArrayList<String> authenticatedGroups = new ArrayList<String>();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!