Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 092a8157
authored
Oct 28, 2010
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug introduced in
7f68ac52
1 parent
8c3752b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
code/LanBortalAuthModule/src/fi/insomnia/bortal/BortalLoginModule.java
code/LanBortalAuthModule/src/fi/insomnia/bortal/BortalLoginModule.java
View file @
092a815
...
...
@@ -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
(
_passw
or
d
)))
{
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
>();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment