Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​AspNetCore.​Authentication.​Cookies.​ITicketStore
Assembly: Microsoft.AspNetCore.Authentication.Cookies
This provides an abstract storage mechanic to preserve identity information on the server while only sending a simple identifier key to the client. This is most commonly used to mitigate issues with serializing large identities into cookies.
Methods
System.​Threading.​Tasks.​Task<​string>
StoreAsync​(AuthenticationTicket ticket)
Store the identity ticket and return the associated key.
Returns The key that can be used to retrieve the identity later.
ticket
The identity information to store.
System.​Threading.​Tasks.​Task<​string>
StoreAsync​(AuthenticationTicket ticket,
System.​Threading.​CancellationToken cancellationToken)
Store the identity ticket and return the associated key.
Returns The key that can be used to retrieve the identity later.
ticket
The identity information to store.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.
System.​Threading.​Tasks.​Task<​string>
StoreAsync​(AuthenticationTicket ticket,
Http.​HttpContext httpContext,
System.​Threading.​CancellationToken cancellationToken)
Store the identity ticket and return the associated key.
Returns The key that can be used to retrieve the identity later.
ticket
The identity information to store.
httpContext
The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> associated with the current request.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.
RenewAsync​(string key,
AuthenticationTicket ticket)
Tells the store that the given identity should be updated.
RenewAsync​(string key,
AuthenticationTicket ticket,
System.​Threading.​CancellationToken cancellationToken)
Tells the store that the given identity should be updated.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.
RenewAsync​(string key,
AuthenticationTicket ticket,
Http.​HttpContext httpContext,
System.​Threading.​CancellationToken cancellationToken)
Tells the store that the given identity should be updated.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.
System.​Threading.​Tasks.​Task<​AuthenticationTicket>
RetrieveAsync​(string key)
Retrieves an identity from the store for the given key.
Returns The identity associated with the given key, or <c>null</c> if not found.
key
The key associated with the identity.
System.​Threading.​Tasks.​Task<​AuthenticationTicket>
RetrieveAsync​(string key,
System.​Threading.​CancellationToken cancellationToken)
Retrieves an identity from the store for the given key.
Returns The identity associated with the given key, or <c>null</c> if not found.
key
The key associated with the identity.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.
System.​Threading.​Tasks.​Task<​AuthenticationTicket>
RetrieveAsync​(string key,
Http.​HttpContext httpContext,
System.​Threading.​CancellationToken cancellationToken)
Retrieves an identity from the store for the given key.
Returns The identity associated with the given key, or <c>null</c> if not found.
key
The key associated with the identity.
httpContext
The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> associated with the current request.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.
RemoveAsync​(string key)
Remove the identity associated with the given key.
key
The key associated with the identity.
RemoveAsync​(string key,
System.​Threading.​CancellationToken cancellationToken)
Remove the identity associated with the given key.
key
The key associated with the identity.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.
RemoveAsync​(string key,
Http.​HttpContext httpContext,
System.​Threading.​CancellationToken cancellationToken)
Remove the identity associated with the given key.
key
The key associated with the identity.
httpContext
The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> associated with the current request.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> used to propagate notifications that the operation should be canceled.