using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace DotNetOAuth {
///
/// 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 {
private Uri requestTokenUri;
///
/// 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 requestTokenUri; }
set {
if (UriUtil.QueryStringContainsOAuthParameters(value)) {
throw new ArgumentException(Strings.RequestUrlMustNotHaveOAuthParameters);
}
requestTokenUri = value;
}
}
///
/// The URL used to obtain User authorization for Consumer access, described in Section 6.2 (Obtaining User Authorization).
///
public Uri UserAuthorizationUri { get; set; }
///
/// 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; }
}
}