| com.ecyrd.jspwiki.event.WikiEvent com.ecyrd.jspwiki.event.WikiSecurityEvent
WikiSecurityEvent | final public class WikiSecurityEvent extends WikiEvent (Code) | | Event class for security events: login/logout, wiki group adds/changes, and
authorization decisions. When a WikiSecurityEvent is constructed, the
security logger
WikiSecurityEvent.log is notified.
These events are logged with priority ERROR :
- login failed - bad credential or password
These events are logged with priority WARN :
- access denied
- login failed - credential expired
- login failed - account expired
These events are logged with priority INFO :
- login succeeded
- logout
- user profile name changed
These events are logged with priority DEBUG :
- access allowed
- add group
- remove group
- clear all groups
- add group member
- remove group member
- clear all members from group
author: Andrew Jaquith since: 2.3.79 |
Field Summary | |
final public static int | ACCESS_ALLOWED When access to a resource is allowed. | final public static int | ACCESS_DENIED When access to a resource is allowed. | final public static int | GROUP_ADD When a new wiki group is added. | final public static int | GROUP_CLEAR_GROUPS When all wiki groups are removed from GroupDatabase. | final public static int | GROUP_REMOVE When a wiki group is deleted. | final public static int | LOGIN_ACCOUNT_EXPIRED When a login fails due to account expiration. | final public static int | LOGIN_ANONYMOUS When a user first accesses JSPWiki, but before logging in or setting a cookie. | final public static int | LOGIN_ASSERTED When a user sets a cookie to assert their identity. | final public static int | LOGIN_AUTHENTICATED When a user authenticates with a username and password, or via container auth. | final public static int | LOGIN_CREDENTIAL_EXPIRED When a login fails due to credential expiration. | final public static int | LOGIN_FAILED When a login fails due to wrong username or password. | final public static int | LOGIN_INITIATED When a user's attempts to log in as guest, via cookies, using a password or otherwise. | final public static int | LOGOUT When a user logs out. | final public static int | PROFILE_NAME_CHANGED When a user profile name changes. | final public static int | PROFILE_SAVE When a user profile is saved. | final public static int | SESSION_EXPIRED When a session expires. | final protected static Logger | log The security logging service. |
Constructor Summary | |
public | WikiSecurityEvent(Object src, int type, Principal principal, Object target) Constructs a new instance of this event type, which signals a security
event has occurred. | public | WikiSecurityEvent(Object src, int type, Object target) Constructs a new instance of this event type, which signals a security
event has occurred. |
Method Summary | |
final public String | eventName(int type) Returns a textual representation of an event type. | final public Object | getPrincipal() Returns the principal to whom the opeation applied, if supplied. | final public Object | getTarget() Returns the object that was operated on, if supplied. | final public String | getTypeDescription() Returns a human-readable description of the event type. | final public String | toString() Prints a String (human-readable) representation of this object. |
ACCESS_ALLOWED | final public static int ACCESS_ALLOWED(Code) | | When access to a resource is allowed.
|
ACCESS_DENIED | final public static int ACCESS_DENIED(Code) | | When access to a resource is allowed.
|
GROUP_ADD | final public static int GROUP_ADD(Code) | | When a new wiki group is added.
|
GROUP_CLEAR_GROUPS | final public static int GROUP_CLEAR_GROUPS(Code) | | When all wiki groups are removed from GroupDatabase.
|
GROUP_REMOVE | final public static int GROUP_REMOVE(Code) | | When a wiki group is deleted.
|
LOGIN_ACCOUNT_EXPIRED | final public static int LOGIN_ACCOUNT_EXPIRED(Code) | | When a login fails due to account expiration.
|
LOGIN_ANONYMOUS | final public static int LOGIN_ANONYMOUS(Code) | | When a user first accesses JSPWiki, but before logging in or setting a cookie.
|
LOGIN_ASSERTED | final public static int LOGIN_ASSERTED(Code) | | When a user sets a cookie to assert their identity.
|
LOGIN_AUTHENTICATED | final public static int LOGIN_AUTHENTICATED(Code) | | When a user authenticates with a username and password, or via container auth.
|
LOGIN_CREDENTIAL_EXPIRED | final public static int LOGIN_CREDENTIAL_EXPIRED(Code) | | When a login fails due to credential expiration.
|
LOGIN_FAILED | final public static int LOGIN_FAILED(Code) | | When a login fails due to wrong username or password.
|
LOGIN_INITIATED | final public static int LOGIN_INITIATED(Code) | | When a user's attempts to log in as guest, via cookies, using a password or otherwise.
|
LOGOUT | final public static int LOGOUT(Code) | | When a user logs out.
|
PROFILE_NAME_CHANGED | final public static int PROFILE_NAME_CHANGED(Code) | | When a user profile name changes.
|
PROFILE_SAVE | final public static int PROFILE_SAVE(Code) | | When a user profile is saved.
|
SESSION_EXPIRED | final public static int SESSION_EXPIRED(Code) | | When a session expires.
|
log | final protected static Logger log(Code) | | The security logging service.
|
WikiSecurityEvent | public WikiSecurityEvent(Object src, int type, Principal principal, Object target)(Code) | | Constructs a new instance of this event type, which signals a security
event has occurred. The source parameter is required, and
may not be null . When the WikiSecurityEvent is
constructed, the security logger
WikiSecurityEvent.log is notified.
Parameters: src - the source of the event, which can be any object: a wikipage, group or authentication/authentication/group manager. Parameters: type - the type of event Parameters: principal - the subject of the event, which may be null Parameters: target - the changed Object, which may be null |
WikiSecurityEvent | public WikiSecurityEvent(Object src, int type, Object target)(Code) | | Constructs a new instance of this event type, which signals a security
event has occurred. The source parameter is required, and
may not be null . When the WikiSecurityEvent is
constructed, the security logger
WikiSecurityEvent.log is notified.
Parameters: src - the source of the event, which can be any object: a wikipage, group or authentication/authentication/group manager. Parameters: type - the type of event Parameters: target - the changed Object, which may be null . |
eventName | final public String eventName(int type)(Code) | | Returns a textual representation of an event type.
Parameters: type - the type the string representation |
getPrincipal | final public Object getPrincipal()(Code) | | Returns the principal to whom the opeation applied, if supplied. This
method may return null
— and calling methods should check for this condition.
the changed object |
getTarget | final public Object getTarget()(Code) | | Returns the object that was operated on, if supplied. This method may
return null
— and calling methods should check for this condition.
the changed object |
getTypeDescription | final public String getTypeDescription()(Code) | | Returns a human-readable description of the event type.
a String description of the type |
|
|