// Copyright (c) .NET Foundation. All rights reserved. See License.txt in the project root for license information. using System.Threading.Tasks; namespace Microsoft.AspNet.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. /// public interface ITicketStore { /// /// Store the identity ticket and return the associated key. /// /// The identity information to store. /// The key that can be used to retrieve the identity later. Task StoreAsync(AuthenticationTicket ticket); /// /// Tells the store that the given identity should be updated. /// /// /// /// Task RenewAsync(string key, AuthenticationTicket ticket); /// /// Retrieves an identity from the store for the given key. /// /// The key associated with the identity. /// The identity associated with the given key, or if not found. Task RetrieveAsync(string key); /// /// Remove the identity associated with the given key. /// /// The key associated with the identity. /// Task RemoveAsync(string key); } }