diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-23 08:08:04 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-23 08:08:04 -0700 |
commit | 22341a07b0ba0dc685bb859b0ed82c22fc3c09db (patch) | |
tree | 3a735cce2271b5b7b276bf5e4620348580726ba4 /src/DotNetOAuth/ServiceProvider.cs | |
parent | 77adf75348090e79d3e93bff78a74c8688d8b58b (diff) | |
download | DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.zip DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.tar.gz DotNetOpenAuth-22341a07b0ba0dc685bb859b0ed82c22fc3c09db.tar.bz2 |
Implementing and refactoring ServiceProvider and Consumer classes.
Beginning to write a test for the spec's appendix A scenario.
Diffstat (limited to 'src/DotNetOAuth/ServiceProvider.cs')
-rw-r--r-- | src/DotNetOAuth/ServiceProvider.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/DotNetOAuth/ServiceProvider.cs b/src/DotNetOAuth/ServiceProvider.cs index 7cf41cc..812a6a8 100644 --- a/src/DotNetOAuth/ServiceProvider.cs +++ b/src/DotNetOAuth/ServiceProvider.cs @@ -23,9 +23,9 @@ namespace DotNetOAuth { /// </remarks>
internal class ServiceProvider {
/// <summary>
- /// The field used to store the value of the <see cref="RequestTokenUri"/> property.
+ /// The field used to store the value of the <see cref="RequestTokenEndpoint"/> property.
/// </summary>
- private Uri requestTokenUri;
+ private ServiceProviderEndpoint requestTokenEndpoint;
/// <summary>
/// Gets or sets the URL used to obtain an unauthorized Request Token,
@@ -36,16 +36,17 @@ namespace DotNetOAuth { /// This is the URL that <see cref="Messages.RequestTokenMessage"/> messages are directed to.
/// </remarks>
/// <exception cref="ArgumentException">Thrown if this property is set to a URI with OAuth protocol parameters.</exception>
- public Uri RequestTokenUri {
+ public ServiceProviderEndpoint RequestTokenEndpoint {
get {
- return this.requestTokenUri;
+ return this.requestTokenEndpoint;
}
set {
- if (UriUtil.QueryStringContainsOAuthParameters(value)) {
+ if (value != null && UriUtil.QueryStringContainsOAuthParameters(value.Location)) {
throw new ArgumentException(Strings.RequestUrlMustNotHaveOAuthParameters);
}
- this.requestTokenUri = value;
+
+ this.requestTokenEndpoint = value;
}
}
@@ -57,7 +58,7 @@ namespace DotNetOAuth { /// This is the URL that <see cref="Messages.DirectUserToServiceProviderMessage"/> messages are
/// indirectly (via the user agent) sent to.
/// </remarks>
- public Uri UserAuthorizationUri { get; set; }
+ public ServiceProviderEndpoint UserAuthorizationEndpoint { get; set; }
/// <summary>
/// Gets or sets the URL used to exchange the User-authorized Request Token
@@ -66,6 +67,6 @@ namespace DotNetOAuth { /// <remarks>
/// This is the URL that <see cref="Messages.RequestAccessTokenMessage"/> messages are directed to.
/// </remarks>
- public Uri AccessTokenUri { get; set; }
+ public ServiceProviderEndpoint AccessTokenEndpoint { get; set; }
}
}
|