T
- the type of the builderpublic class AuthenticationAuditEventBuilder<T extends AuthenticationAuditEventBuilder<T>> extends AuditEventBuilder<T>
This builder should not be used directly but be specialized for each product to allow to define new specific fields, e.g
class OpenProductAuthenticationAuditEventBuilder <T extends OpenProductAuthenticationAuditEventBuilder<T>>
extends AuthenticationAuditEventBuilder <T>
{
protected OpenProductAuthenticationAuditEventBuilder(DnsUtils dnsUtils) {
super(dnsUtils);
}
public static <T>
OpenProductAuthenticationAuditEventBuilder <?>
productAuthenticationEvent() {
return new OpenProductAuthenticationAuditEventBuilder(new DnsUtils());
}
public T someField(String v) {
jsonValue.put("someField", v);
return self();
}
...
}
Modifier and Type | Class and Description |
---|---|
static class |
AuthenticationAuditEventBuilder.Status
Defines a fixed set of authentication statuses that can be logged.
|
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT
Defines the context key.
|
static String |
ENTRIES
Defines the entries key.
|
static String |
PRINCIPAL
Defines the principal key.
|
static String |
RESULT
Defines the authentication result key.
|
EVENT_NAME, jsonValue, TIMESTAMP, TRACKING_IDS, TRANSACTION_ID, USER_ID
Constructor and Description |
---|
AuthenticationAuditEventBuilder() |
Modifier and Type | Method and Description |
---|---|
static AuthenticationAuditEventBuilder<?> |
authenticationEvent()
Starts to build an audit authentication event.
|
T |
context(Map<String,Object> context)
Sets the context used in the authentication event.
|
T |
entries(List<?> entries)
Sets the list of auth modules used in the authentication event and their state.
|
T |
principal(List<String> principals)
Sets the principals of the authentication event.
|
T |
result(AuthenticationAuditEventBuilder.Status result)
Sets the authentication audit event overall result.
|
eventName, requireField, self, setDefaults, timestamp, toEvent, trackingId, trackingIds, transactionId, transactionIdFromContext, userId, validate
public static final String RESULT
public static final String PRINCIPAL
public static final String CONTEXT
public static final String ENTRIES
public static AuthenticationAuditEventBuilder<?> authenticationEvent()
Note: it is preferable to use a specialized builder that allow to add fields specific to a product.
public T result(AuthenticationAuditEventBuilder.Status result)
result
- the authentication overall result.public T principal(List<String> principals)
principals
- the list of principalspublic T context(Map<String,Object> context)
context
- the authentication event contextCopyright © 2025 Open Identity Platform Community. All rights reserved.