Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 {
...
@@ -79,16 +79,17 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
RealmBeanRemote
authbean
=
BortalRealm
.
getAuthBean
();
RealmBeanRemote
authbean
=
BortalRealm
.
getAuthBean
();
if
(
authbean
==
null
)
{
if
(
authbean
==
null
)
{
throw
new
LoginException
(
"Error. Could not get authentication bean!"
);
throw
new
LoginException
(
"Error. Could not get authentication bean!"
);
}
}
// Authenticate User
// Authenticate User
BortalRealm
samplerealm
=
(
BortalRealm
)
_currentRealm
;
BortalRealm
samplerealm
=
(
BortalRealm
)
_currentRealm
;
if
(!
authbean
.
authenticate
(
_username
,
new
String
(
_passw
or
d
)))
{
if
(!
authbean
.
authenticate
(
_username
,
new
String
(
_passwd
)))
{
// Login fails
// Login fails
throw
new
LoginException
((
new
StringBuilder
())
throw
new
LoginException
((
new
StringBuilder
())
.
append
(
"customrealm:Login Failed for user "
)
.
append
(
"customrealm:Login Failed for user "
)
.
append
(
_username
).
toString
());
.
append
(
_username
).
toString
());
}
}
// Login succeeds
// Login succeeds
...
@@ -100,15 +101,17 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
...
@@ -100,15 +101,17 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
try
{
try
{
enumeration
=
samplerealm
.
getGroupNames
(
_username
);
enumeration
=
samplerealm
.
getGroupNames
(
_username
);
}
catch
(
InvalidOperationException
invalidoperationexception
)
{
}
catch
(
InvalidOperationException
invalidoperationexception
)
{
throw
new
LoginException
((
new
StringBuilder
())
throw
new
LoginException
(
.
append
(
"An InvalidOperationException was thrown "
+
(
new
StringBuilder
())
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
"An InvalidOperationException was thrown "
.
append
(
invalidoperationexception
).
toString
());
+
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
invalidoperationexception
).
toString
());
}
catch
(
NoSuchUserException
nosuchuserexception
)
{
}
catch
(
NoSuchUserException
nosuchuserexception
)
{
throw
new
LoginException
((
new
StringBuilder
())
throw
new
LoginException
(
.
append
(
"A NoSuchUserException was thrown "
+
(
new
StringBuilder
())
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
"A NoSuchUserException was thrown "
.
append
(
nosuchuserexception
).
toString
());
+
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
nosuchuserexception
).
toString
());
}
}
ArrayList
<
String
>
authenticatedGroups
=
new
ArrayList
<
String
>();
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