//-----------------------------------------------------------------------
//
// Copyright (c) Andrew Arnott. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOAuth {
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
///
/// A web application that allows access via OAuth.
///
///
/// The Service Provider’s documentation should include:
///
/// - The URLs (Request URLs) the Consumer will use when making OAuth requests, and the HTTP methods (i.e. GET, POST, etc.) used in the Request Token URL and Access Token URL.
/// - Signature methods supported by the Service Provider.
/// - Any additional request parameters that the Service Provider requires in order to obtain a Token. Service Provider specific parameters MUST NOT begin with oauth_.
///
///
internal class ServiceProvider {
///
/// The field used to store the value of the property.
///
private Uri requestTokenUri;
///
/// 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.
///
/// Thrown if this property is set to a URI with OAuth protocol parameters.
public Uri RequestTokenUri {
get {
return this.requestTokenUri;
}
set {
if (UriUtil.QueryStringContainsOAuthParameters(value)) {
throw new ArgumentException(Strings.RequestUrlMustNotHaveOAuthParameters);
}
this.requestTokenUri = value;
}
}
///
/// Gets or sets the URL used to obtain User authorization for Consumer access,
/// described in Section 6.2 (Obtaining User Authorization).
///
public Uri UserAuthorizationUri { 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).
///
public Uri AccessTokenUri { get; set; }
}
}