ITicketStore Interface

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.

Namespace
Microsoft.AspNetCore.Authentication.Cookies
Assemblies
  • Microsoft.AspNetCore.Authentication.Cookies

Syntax

public interface ITicketStore
interface Microsoft.AspNetCore.Authentication.Cookies.ITicketStore

Methods

RemoveAsync(System.String)

Remove the identity associated with the given key.

Arguments:key (System.String) – The key associated with the identity.
Return type:System.Threading.Tasks.Task
Task RemoveAsync(string key)
RenewAsync(System.String, Microsoft.AspNetCore.Authentication.AuthenticationTicket)

Tells the store that the given identity should be updated.

Return type:System.Threading.Tasks.Task
Task RenewAsync(string key, AuthenticationTicket ticket)
RetrieveAsync(System.String)

Retrieves an identity from the store for the given key.

Arguments:key (System.String) – The key associated with the identity.
Return type:System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticationTicket>
Returns:The identity associated with the given key, or if not found.
Task<AuthenticationTicket> RetrieveAsync(string key)
StoreAsync(Microsoft.AspNetCore.Authentication.AuthenticationTicket)

Store the identity ticket and return the associated key.

Arguments:ticket (Microsoft.AspNetCore.Authentication.AuthenticationTicket) – The identity information to store.
Return type:System.Threading.Tasks.Task<System.String>
Returns:The key that can be used to retrieve the identity later.
Task<string> StoreAsync(AuthenticationTicket ticket)