diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-11-03 16:02:57 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-11-03 16:02:57 -0800 |
commit | aa1f55f58a561ff64dc268977d0d7c9decb92bbe (patch) | |
tree | fd685f00353d26493b40df7eaeac78745e27d1b8 /src/DotNetOAuth/OAuth/Messages/AuthorizedTokenResponse.cs | |
parent | f1794fc8779ae39ac3d5bc6e8b811523e62ca482 (diff) | |
download | DotNetOpenAuth-aa1f55f58a561ff64dc268977d0d7c9decb92bbe.zip DotNetOpenAuth-aa1f55f58a561ff64dc268977d0d7c9decb92bbe.tar.gz DotNetOpenAuth-aa1f55f58a561ff64dc268977d0d7c9decb92bbe.tar.bz2 |
Moved all the OAuth classes into its own namespace in preparation to receiving DotNetOpenId merge.
Diffstat (limited to 'src/DotNetOAuth/OAuth/Messages/AuthorizedTokenResponse.cs')
-rw-r--r-- | src/DotNetOAuth/OAuth/Messages/AuthorizedTokenResponse.cs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/DotNetOAuth/OAuth/Messages/AuthorizedTokenResponse.cs b/src/DotNetOAuth/OAuth/Messages/AuthorizedTokenResponse.cs new file mode 100644 index 0000000..4c28edd --- /dev/null +++ b/src/DotNetOAuth/OAuth/Messages/AuthorizedTokenResponse.cs @@ -0,0 +1,60 @@ +//-----------------------------------------------------------------------
+// <copyright file="AuthorizedTokenResponse.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth.OAuth.Messages {
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using DotNetOAuth.Messaging;
+
+ /// <summary>
+ /// A direct message sent from Service Provider to Consumer in response to
+ /// a Consumer's <see cref="AuthorizedTokenRequest"/> request.
+ /// </summary>
+ public class AuthorizedTokenResponse : MessageBase, ITokenSecretContainingMessage {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AuthorizedTokenResponse"/> class.
+ /// </summary>
+ protected internal AuthorizedTokenResponse()
+ : base(MessageProtections.None, MessageTransport.Direct) {
+ }
+
+ /// <summary>
+ /// Gets or sets the Access Token assigned by the Service Provider.
+ /// </summary>
+ [MessagePart("oauth_token", IsRequired = true)]
+ public string AccessToken { get; set; }
+
+ /// <summary>
+ /// Gets or sets the Request or Access Token.
+ /// </summary>
+ [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "This property IS accessible by a different name.")]
+ string ITokenContainingMessage.Token {
+ get { return this.AccessToken; }
+ set { this.AccessToken = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the Request or Access Token secret.
+ /// </summary>
+ string ITokenSecretContainingMessage.TokenSecret {
+ get { return this.TokenSecret; }
+ set { this.TokenSecret = value; }
+ }
+
+ /// <summary>
+ /// Gets the extra, non-OAuth parameters that will be included in the message.
+ /// </summary>
+ public new IDictionary<string, string> ExtraData {
+ get { return base.ExtraData; }
+ }
+
+ /// <summary>
+ /// Gets or sets the Token Secret.
+ /// </summary>
+ [MessagePart("oauth_token_secret", IsRequired = true)]
+ protected internal string TokenSecret { get; set; }
+ }
+}
|