public final class WikiSecurityEvent extends WikiEvent
Event class for security events: login/logout, wiki group adds/changes, and authorization decisions. When a WikiSecurityEvent
is constructed, the security logger LOG is notified.
These events are logged with priority ERROR:
These events are logged with priority WARN:
These events are logged with priority INFO:
These events are logged with priority DEBUG:
| Modifier and Type | Field and Description |
|---|---|
static int |
ACCESS_ALLOWED
When access to a resource is allowed.
|
static int |
ACCESS_DENIED
When access to a resource is allowed.
|
static int |
GROUP_ADD
When a new wiki group is added.
|
static int |
GROUP_CLEAR_GROUPS
When all wiki groups are removed from GroupDatabase.
|
static int |
GROUP_REMOVE
When a wiki group is deleted.
|
static int |
LOGIN_ACCOUNT_EXPIRED
When a login fails due to account expiration.
|
static int |
LOGIN_ANONYMOUS
When a user first accesses JSPWiki, but before logging in or setting a cookie.
|
static int |
LOGIN_ASSERTED
When a user sets a cookie to assert their identity.
|
static int |
LOGIN_AUTHENTICATED
When a user authenticates with a username and password, or via container auth.
|
static int |
LOGIN_CREDENTIAL_EXPIRED
When a login fails due to credential expiration.
|
static int |
LOGIN_FAILED
When a login fails due to wrong username or password.
|
static int |
LOGIN_INITIATED
When a user's attempts to log in as guest, via cookies, using a password or otherwise.
|
static int |
LOGOUT
When a user logs out.
|
static int |
PRINCIPAL_ADD
When a Principal should be added to the Session
|
static int |
PROFILE_NAME_CHANGED
When a user profile name changes.
|
static int |
PROFILE_SAVE
When a user profile is saved.
|
static int |
SESSION_EXPIRED
When a session expires.
|
| Constructor and Description |
|---|
WikiSecurityEvent(java.lang.Object src,
int type,
java.lang.Object target)
Constructs a new instance of this event type, which signals a security event has occurred.
|
WikiSecurityEvent(java.lang.Object src,
int type,
java.security.Principal principal,
java.lang.Object target)
Constructs a new instance of this event type, which signals a security event has occurred.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
eventName(int type)
Returns a textual representation of an event type.
|
java.lang.Object |
getPrincipal()
Returns the principal to whom the operation applied, if supplied.
|
java.lang.Object |
getTarget()
Returns the object that was operated on, if supplied.
|
java.lang.String |
getTypeDescription()
Returns a human-readable description of the event type.
|
java.lang.String |
toString()
Prints a String (human-readable) representation of this object.
|
public static final int LOGIN_INITIATED
public static final int LOGIN_ANONYMOUS
public static final int LOGIN_ASSERTED
public static final int LOGIN_AUTHENTICATED
public static final int LOGIN_ACCOUNT_EXPIRED
public static final int LOGIN_CREDENTIAL_EXPIRED
public static final int LOGIN_FAILED
public static final int LOGOUT
public static final int PRINCIPAL_ADD
public static final int SESSION_EXPIRED
public static final int GROUP_ADD
public static final int GROUP_REMOVE
public static final int GROUP_CLEAR_GROUPS
public static final int ACCESS_ALLOWED
public static final int ACCESS_DENIED
public static final int PROFILE_SAVE
public static final int PROFILE_NAME_CHANGED
public WikiSecurityEvent(java.lang.Object src, int type, java.security.Principal principal, java.lang.Object target)
source parameter is
required, and may not be null. When the WikiSecurityEvent is constructed, the security logger LOG is notified.src - the source of the event, which can be any object: a wiki page, group or authentication/authentication/group manager.type - the type of eventprincipal - the subject of the event, which may be nulltarget - the changed Object, which may be nullpublic WikiSecurityEvent(java.lang.Object src, int type, java.lang.Object target)
source parameter
is required, and may not be null. When the WikiSecurityEvent is constructed, the security logger LOG
is notified.src - the source of the event, which can be any object: a wiki page, group or authentication/authentication/group manager.type - the type of eventtarget - the changed Object, which may be null.public java.lang.Object getPrincipal()
null
— and calling methods should check for this condition.public java.lang.Object getTarget()
null
— and calling methods should check for this condition.public java.lang.String toString()
public java.lang.String eventName(int type)
type - the typepublic java.lang.String getTypeDescription()
getTypeDescription in class WikiEventCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.