//----------------------------------------------------------------------- // // Copyright (c) Andrew Arnott. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.OAuth2.ChannelElements { using System.Security.Cryptography; using Messaging; /// /// The various types of tokens created by the authorization server. /// internal enum CodeOrTokenType { /// /// The code issued to the client after the user has approved authorization. /// AuthorizationCode, /// /// The long-lived token issued to the client that enables it to obtain /// short-lived access tokens later. /// RefreshToken, /// /// A (typically) short-lived token. /// AccessToken, } /// /// A message that carries some kind of token from the client to the authorization or resource server. /// internal interface IAuthorizationCarryingRequest : IDirectedProtocolMessage { /// /// Gets or sets the verification code or refresh/access token. /// /// The code or token. string CodeOrToken { get; set; } /// /// Gets the type of the code or token. /// /// The type of the code or token. CodeOrTokenType CodeOrTokenType { get; } /// /// Gets or sets the authorization that the token describes. /// IAuthorizationDescription AuthorizationDescription { get; set; } } }