ConsumedRequestUriRegistry Class
Keeps the ended flows in the same entity storage the stored requests live in.
public class ConsumedRequestUriRegistry : Abblix.Oidc.Server.Features.Storages.IConsumedRequestUriRegistryInheritance System.Object → ConsumedRequestUriRegistry
Implements IConsumedRequestUriRegistry
Constructors
ConsumedRequestUriRegistry(IEntityStorage, IEntityStorageKeyFactory, TimeProvider) Constructor
Keeps the ended flows in the same entity storage the stored requests live in.
public ConsumedRequestUriRegistry(Abblix.Oidc.Server.Features.Storages.IEntityStorage storage, Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory keyFactory, System.TimeProvider timeProvider);Parameters
storage IEntityStorage
Where the record is written and read.
keyFactory IEntityStorageKeyFactory
Names the record.
timeProvider System.TimeProvider
Dates the record.
Methods
ConsumedRequestUriRegistry.IsConsumedAsync(TenantDefinition, Uri) Method
Whether the flow begun with requestUri has ended.
public 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.
Implements IsConsumedAsync(TenantDefinition, Uri)
Returns
System.Threading.Tasks.Task<System.Boolean>
ConsumedRequestUriRegistry.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.
public 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.
Implements TryConsumeAsync(TenantDefinition, Uri, DateTimeOffset)
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.