//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.OAuth2 { using System; using System.Collections.Generic; /// /// Provides access to a persistent object that tracks the state of an authorization. /// public interface IAuthorizationState { /// /// Gets or sets the callback URL used to obtain authorization. /// /// The callback URL. Uri Callback { get; set; } /// /// Gets or sets the long-lived token used to renew the short-lived . /// /// The refresh token. string RefreshToken { get; set; } /// /// Gets or sets the access token. /// /// The access token. string AccessToken { get; set; } /// /// Gets or sets the access token issue date UTC. /// /// The access token issue date UTC. DateTime? AccessTokenIssueDateUtc { get; set; } /// /// Gets or sets the access token UTC expiration date. /// DateTime? AccessTokenExpirationUtc { get; set; } /// /// Gets the scope the token is (to be) authorized for. /// /// The scope. HashSet Scope { get; } /// /// Deletes this authorization, including access token and refresh token where applicable. /// /// /// This method is invoked when an authorization attempt fails, is rejected, is revoked, or /// expires and cannot be renewed. /// void Delete(); /// /// Saves any changes made to this authorization object's properties. /// /// /// This method is invoked after DotNetOpenAuth changes any property. /// void SaveChanges(); } }