//-----------------------------------------------------------------------
//
// Copyright (c) Andrew Arnott. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOAuth {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetOAuth.Messaging;
///
/// A description of the endpoints on a Service Provider.
///
public class ServiceProviderEndpoints {
///
/// The field used to store the value of the property.
///
private ServiceProviderEndpoint requestTokenEndpoint;
///
/// Initializes a new instance of the class.
///
public ServiceProviderEndpoints(){
}
///
/// Gets or sets the URL used to obtain an unauthorized Request Token,
/// described in Section 6.1 (Obtaining an Unauthorized Request Token).
///
///
/// The request URL query MUST NOT contain any OAuth Protocol Parameters.
/// This is the URL that messages are directed to.
///
/// Thrown if this property is set to a URI with OAuth protocol parameters.
public ServiceProviderEndpoint RequestTokenEndpoint {
get {
return this.requestTokenEndpoint;
}
set {
if (value != null && UriUtil.QueryStringContainsOAuthParameters(value.Location)) {
throw new ArgumentException(Strings.RequestUrlMustNotHaveOAuthParameters);
}
this.requestTokenEndpoint = value;
}
}
///
/// Gets or sets the URL used to obtain User authorization for Consumer access,
/// described in Section 6.2 (Obtaining User Authorization).
///
///
/// This is the URL that messages are
/// indirectly (via the user agent) sent to.
///
public ServiceProviderEndpoint UserAuthorizationEndpoint { get; set; }
///
/// Gets or sets the URL used to exchange the User-authorized Request Token
/// for an Access Token, described in Section 6.3 (Obtaining an Access Token).
///
///
/// This is the URL that messages are directed to.
///
public ServiceProviderEndpoint AccessTokenEndpoint { get; set; }
}
}