Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 81b6c93a
authored
Jan 10, 2015
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not explode if principal is null
1 parent
9a98b30e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/JaasBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/JaasBean.java
View file @
81b6c93
...
...
@@ -114,7 +114,7 @@ public class JaasBean implements MoyaRealmBeanRemote {
// If there is no eventuser found, try to create one.
if
(
user
!=
null
)
{
logger
.
info
(
"TryLogin user not null: {}
"
,
user
);
logger
.
info
(
"TryLogin user not null: {}
, login {}"
,
user
,
user
.
getLogin
()
);
if
(
user
.
isAnonymous
())
{
logger
.
info
(
"logging in as anonymous!!!"
);
}
else
if
(!
user
.
checkPassword
(
password
))
{
...
...
@@ -140,7 +140,7 @@ public class JaasBean implements MoyaRealmBeanRemote {
}
// jos logitetaan anomuumi, niin uuden tapahtuman luominen hajoaa jännästi.
if
(!
user
.
isAnonymous
())
if
(
user
!=
null
&&
!
user
.
isAnonymous
())
secubean
.
sendMessage
(
MoyaEventType
.
LOGIN_SUCCESSFULL
,
eventUser
,
"User logged in with username: '"
,
username
,
"' eventuser: "
,
eventUser
);
}
else
{
secubean
.
sendMessage
(
MoyaEventType
.
LOGIN_FAILED
,
eventUserFacade
.
findByLogin
(
User
.
ANONYMOUS_LOGINNAME
),
"Login failed: Username not found: "
,
username
);
...
...
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