Interface IAuditStore<TAudit>
Provides an abstraction for a store which manages auditing.
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public interface IAuditStore<TAudit> : IDisposable where TAudit : IIdentityAudit
Type Parameters
TAudit
The type encapsulating an audit. |
Methods
ClearAuditsAsync(TimeSpan, CancellationToken)
Clears all audits (for all users) created before the provided maxAge
.
Declaration
Task ClearAuditsAsync(TimeSpan maxAge, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TimeSpan
maxAge
The max age of the audit posts to keep. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task
The System.Threading.Tasks.Task that represents the asynchronous operation. |
CreateAsync(TAudit, CancellationToken)
Creates the specified audit
in the audit store.
Declaration
Task<IdentityResult> CreateAsync(TAudit audit, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TAudit
audit
The audit to create. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<IdentityResult>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult of the creation operation. |
CreateAudit()
Create a new entity representing an audit.
Declaration
TAudit CreateAudit()
Returns
TAudit
|
DeleteUserAuditsAsync(Guid, CancellationToken)
Deletes the audits for the user with the specified userId
from the backing store.
Declaration
Task<IdentityResult> DeleteUserAuditsAsync(Guid userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Guid
userId
The id of the user to delete all audits for. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<IdentityResult>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult of the operation. |
GetUserAuditsAsync(IdQuery, CancellationToken)
Returns a list of audits for the specified user id.
Declaration
Task<QueryResult<TAudit>> GetUserAuditsAsync(IdQuery query, CancellationToken cancellationToken = default(CancellationToken))
Parameters
IdQuery
query
The IdQuery object representing the user id and pageing information. |
System.Threading.CancellationToken
cancellationToken
The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled. |
Returns
System.Threading.Tasks.Task<QueryResult<TAudit>>
The System.Threading.Tasks.Task that represents the asynchronous operation, a QueryResult<T> with a collection of |