diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-23 07:47:08 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-23 07:47:08 -0800 |
commit | 8679fd44bbe14b590353c128d47e9a73cf180160 (patch) | |
tree | 7b69e3a3170c6c825cb958863a924146c3e427ba /src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs | |
parent | d1ef15d419f5235cc7266c9128790e20b92c5e58 (diff) | |
download | DotNetOpenAuth-8679fd44bbe14b590353c128d47e9a73cf180160.zip DotNetOpenAuth-8679fd44bbe14b590353c128d47e9a73cf180160.tar.gz DotNetOpenAuth-8679fd44bbe14b590353c128d47e9a73cf180160.tar.bz2 |
Split out the authorization carrying messages into distinct interfaces.
This is to support additional grant types such as resource owner password credential and client credentials.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs index c069d08..246a4ef 100644 --- a/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs +++ b/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs @@ -20,7 +20,7 @@ namespace DotNetOpenAuth.OAuth2.Messages { /// When support for additional access token types is added, this class should probably be refactored /// into derived types, where each derived type supports a particular access token type. /// </remarks> - internal class AccessProtectedResourceRequest : MessageBase, IAuthorizationCarryingRequest { + internal class AccessProtectedResourceRequest : MessageBase, IAccessTokenCarryingRequest { /// <summary> /// Initializes a new instance of the <see cref="AccessProtectedResourceRequest"/> class. /// </summary> @@ -30,19 +30,12 @@ namespace DotNetOpenAuth.OAuth2.Messages { : base(version, MessageTransport.Direct, recipient) { } - /// <summary> - /// Gets the type of the code or token. - /// </summary> - /// <value>The type of the code or token.</value> - CodeOrTokenType IAuthorizationCarryingRequest.CodeOrTokenType { - get { return CodeOrTokenType.AccessToken; } - } + #region IAccessTokenCarryingRequest Members /// <summary> - /// Gets or sets the verification code or refresh/access token. + /// Gets or sets the access token. /// </summary> - /// <value>The code or token.</value> - string IAuthorizationCarryingRequest.CodeOrToken { + string IAccessTokenCarryingRequest.AccessToken { get { return this.AccessToken; } set { this.AccessToken = value; } } @@ -50,7 +43,16 @@ namespace DotNetOpenAuth.OAuth2.Messages { /// <summary> /// Gets or sets the authorization that the token describes. /// </summary> - IAuthorizationDescription IAuthorizationCarryingRequest.AuthorizationDescription { get; set; } + AccessToken IAccessTokenCarryingRequest.AuthorizationDescription { get; set; } + + /// <summary> + /// Gets the authorization that the token describes. + /// </summary> + IAuthorizationDescription IAuthorizationCarryingRequest.AuthorizationDescription { + get { return ((IAccessTokenCarryingRequest)this).AuthorizationDescription; } + } + + #endregion /// <summary> /// Gets the type of the access token. |