summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth.Consumer/OAuth/AccessTokenResponse.cs
blob: c2003c9a33e5162f374c24d56023a976bf1dec26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//-----------------------------------------------------------------------
// <copyright file="AccessTokenResponse.cs" company="Andrew Arnott">
//     Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.OAuth {
	using System;
	using System.Collections.Generic;
	using System.Collections.Specialized;
	using System.Linq;
	using System.Text;
	using System.Threading.Tasks;

	/// <summary>
	/// Captures the data that is returned from a request for an access token.
	/// </summary>
	public class AccessTokenResponse {
		/// <summary>
		/// Initializes a new instance of the <see cref="AccessTokenResponse"/> class.
		/// </summary>
		/// <param name="accessToken">The access token.</param>
		/// <param name="tokenSecret">The token secret.</param>
		/// <param name="extraData">Any extra data that came with the response.</param>
		public AccessTokenResponse(string accessToken, string tokenSecret, NameValueCollection extraData) {
			this.AccessToken = new AccessToken(accessToken, tokenSecret);
			this.ExtraData = extraData;
		}

		/// <summary>
		/// Gets or sets the access token.
		/// </summary>
		/// <value>
		/// The access token.
		/// </value>
		public AccessToken AccessToken { get; set; }

		/// <summary>
		/// Gets or sets any extra data that came with the response..
		/// </summary>
		public NameValueCollection ExtraData { get; set; }
	}
}