public class AuditResource extends Object implements SingletonResourceProvider
CREST resource responsible for exposing the audit records created by the JASPI runtime.
The resource offers only two operations, read and an action of "readAndClear". Performing a read will simply read the audit records and performing a "readAndClear" action will read and clear the audit records.
Constructor and Description |
---|
AuditResource(TestAuditApi auditApi)
Constructs a new AuditResource instance.
|
Modifier and Type | Method and Description |
---|---|
Promise<ActionResponse,ResourceException> |
actionInstance(Context context,
ActionRequest request)
Only the "readAndClear" action is supported, which will read the audit records and then subsequently clear them.
|
Promise<ResourceResponse,ResourceException> |
patchInstance(Context context,
PatchRequest request)
Unsupported operation.
|
Promise<ResourceResponse,ResourceException> |
readInstance(Context context,
ReadRequest request)
Will perform a read of the audit records.
|
Promise<ResourceResponse,ResourceException> |
updateInstance(Context context,
UpdateRequest request)
Unsupported operation.
|
@Inject public AuditResource(TestAuditApi auditApi)
auditApi
- An instance of the TestAuditApi, which stores the audit records made by the JASPI runtime.public Promise<ActionResponse,ResourceException> actionInstance(Context context, ActionRequest request)
actionInstance
in interface SingletonResourceProvider
context
- The request server context.request
- The action request.Promise
containing the result of the operation.RequestHandler.handleAction(Context, ActionRequest)
public Promise<ResourceResponse,ResourceException> patchInstance(Context context, PatchRequest request)
patchInstance
in interface SingletonResourceProvider
context
- The request server context.request
- The patch request.Promise
containing the result of the operation.RequestHandler.handlePatch(Context, PatchRequest)
public Promise<ResourceResponse,ResourceException> readInstance(Context context, ReadRequest request)
readInstance
in interface SingletonResourceProvider
context
- The request server context.request
- The read request.Promise
containing the result of the operation.RequestHandler.handleRead(Context, ReadRequest)
public Promise<ResourceResponse,ResourceException> updateInstance(Context context, UpdateRequest request)
updateInstance
in interface SingletonResourceProvider
context
- The request server context.request
- The update request.Promise
containing the result of the operation.RequestHandler.handleUpdate(Context, UpdateRequest)
Copyright © 2025 Open Identity Platform Community. All rights reserved.