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 e46bb972
authored
Dec 08, 2014
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging of successfull authentications
1 parent
58284cd7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/JaasBean.java
code/moya-utils/src/main/java/fi/codecrew/moya/utilities/moyamessage/MoyaEventType.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/JaasBean.java
View file @
e46bb97
...
...
@@ -106,7 +106,7 @@ public class JaasBean implements MoyaRealmBeanRemote {
logger
.
info
(
"logging in as anonymous!!!"
);
}
else
if
(!
user
.
checkPassword
(
password
))
{
secubean
.
sendMessage
(
MoyaEventType
.
LOGIN_FAILED
,
eventUser
,
"Login failed: wrong password for username "
,
username
);
secubean
.
sendMessage
(
MoyaEventType
.
LOGIN_FAILED
,
eventUser
,
"Login failed: wrong password for username
:
"
,
username
);
eventUser
=
null
;
user
=
null
;
}
...
...
@@ -125,6 +125,7 @@ public class JaasBean implements MoyaRealmBeanRemote {
eventUserFacade
.
flush
();
eventUser
.
setCreator
(
eventUser
);
}
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
);
}
...
...
code/moya-utils/src/main/java/fi/codecrew/moya/utilities/moyamessage/MoyaEventType.java
View file @
e46bb97
...
...
@@ -12,6 +12,7 @@ public enum MoyaEventType {
PLACE_ERROR
(
MoyaEventSource
.
PLACEMAP
),
ACCOUNTEVENT_INFO
(
MoyaEventSource
.
USER
),
USER_PERMISSION_VIOLATION
(
MoyaEventSource
.
USER
),
LOGIN_SUCCESSFULL
(
MoyaEventSource
.
USER
),
;
...
...
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