IConsumedRequestUriRegistry Interface
Records the request URNs whose flow ended with a code or token, for as long as a page of that flow can still be presented.
public interface IConsumedRequestUriRegistryDerived
↳ ConsumedRequestUriRegistry
Remarks
Each page the end user is sent to stores the request under a URN of its own, and a refresh of the page makes another; consuming the URN a code came by leaves the others. The record is what refuses them: each of them carries the URN its flow began with.
Methods
IConsumedRequestUriRegistry.IsConsumedAsync(TenantDefinition, Uri) Method
Whether the flow begun with requestUri has ended.
System.Threading.Tasks.Task<bool> IsConsumedAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, System.Uri requestUri);Parameters
tenant TenantDefinition
The tenant the request URI belongs to.
requestUri System.Uri
The URN the flow began with.
Returns
System.Threading.Tasks.Task<System.Boolean>
IConsumedRequestUriRegistry.TryConsumeAsync(TenantDefinition, Uri, DateTimeOffset) Method
Ends the flow begun with requestUri, answering whether this call is the one that ended it.
The entity storage decides between two pages of one flow ending it together, one being told it did: the
default storage decides within one process only, and across several nodes only an IEntityStorage
built on the store's own primitive, such as Redis SET NX or a unique-key insert, decides.
System.Threading.Tasks.Task<bool> TryConsumeAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, System.Uri requestUri, System.DateTimeOffset expiresAt);Parameters
tenant TenantDefinition
The tenant the request URI belongs to.
requestUri System.Uri
The URN the flow began with.
expiresAt System.DateTimeOffset
When no page of the flow can be presented any more.
Returns
System.Threading.Tasks.Task<System.Boolean>
true when the flow had not ended and this call ended it; false when it had ended
already.