summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Messages/DirectUserToConsumerMessage.cs
blob: 8cd6abb0e37ccd7d24a637d9389f231569c9839b (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
//-----------------------------------------------------------------------
// <copyright file="DirectUserToConsumerMessage.cs" company="Andrew Arnott">
//     Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOAuth.Messages {
	using System;
	using DotNetOAuth.Messaging;

	/// <summary>
	/// A message used to redirect the user from a Service Provider to a Consumer's web site.
	/// </summary>
	internal class DirectUserToConsumerMessage : MessageBase {
		/// <summary>
		/// Initializes a new instance of the <see cref="DirectUserToConsumerMessage"/> class.
		/// </summary>
		/// <param name="consumer">The URI of the Consumer endpoint to send this message to.</param>
		internal DirectUserToConsumerMessage(ServiceProviderEndpoint consumer)
			: base(MessageProtection.None, MessageTransport.Indirect, consumer) {
		}

		/// <summary>
		/// Gets or sets the Request Token.
		/// </summary>
		[MessagePart(Name = "oauth_token", IsRequired = true)] // TODO: graph in spec says this is optional, but in text is suggests it is required.
		public string RequestToken { get; set; }
	}
}