diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/DotNetOpenAuth.csproj | 1 | ||||
-rw-r--r-- | src/DotNetOpenAuth/OAuth2/IAuthorizationServer.cs | 1 | ||||
-rw-r--r-- | src/DotNetOpenAuth/OAuth2/IConsumerDescription.cs | 26 | ||||
-rw-r--r-- | src/DotNetOpenAuth/OAuth2/OAuthUtilities.cs | 3 |
4 files changed, 28 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth/DotNetOpenAuth.csproj b/src/DotNetOpenAuth/DotNetOpenAuth.csproj index bc64780..9819396 100644 --- a/src/DotNetOpenAuth/DotNetOpenAuth.csproj +++ b/src/DotNetOpenAuth/DotNetOpenAuth.csproj @@ -329,6 +329,7 @@ http://opensource.org/licenses/ms-pl.html <Compile Include="OAuth2\IAuthorizationServer.cs" /> <Compile Include="OAuth2\IAuthorizationState.cs" /> <Compile Include="OAuth2\IClientTokenManager.cs" /> + <Compile Include="OAuth2\IConsumerDescription.cs" /> <Compile Include="OAuth2\Messages\AccessProtectedResourceRequest.cs" /> <Compile Include="OAuth2\Messages\Assertion\AssertionRequest.cs" /> <Compile Include="OAuth2\Messages\ClientCredentials\ClientCredentialsRequest.cs" /> diff --git a/src/DotNetOpenAuth/OAuth2/IAuthorizationServer.cs b/src/DotNetOpenAuth/OAuth2/IAuthorizationServer.cs index b302651..c99fbc3 100644 --- a/src/DotNetOpenAuth/OAuth2/IAuthorizationServer.cs +++ b/src/DotNetOpenAuth/OAuth2/IAuthorizationServer.cs @@ -12,7 +12,6 @@ namespace DotNetOpenAuth.OAuth2 { using System.Security.Cryptography; using System.Text; using DotNetOpenAuth.Messaging.Bindings; - using DotNetOpenAuth.OAuth.ChannelElements; using DotNetOpenAuth.OAuth2.ChannelElements; /// <summary> diff --git a/src/DotNetOpenAuth/OAuth2/IConsumerDescription.cs b/src/DotNetOpenAuth/OAuth2/IConsumerDescription.cs new file mode 100644 index 0000000..f0fc20a --- /dev/null +++ b/src/DotNetOpenAuth/OAuth2/IConsumerDescription.cs @@ -0,0 +1,26 @@ +//----------------------------------------------------------------------- +// <copyright file="IConsumerDescription.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- + +namespace DotNetOpenAuth.OAuth2 { + using System; + using System.Security.Cryptography.X509Certificates; + + /// <summary> + /// A description of a consumer from a Service Provider's point of view. + /// </summary> + public interface IConsumerDescription { + /// <summary> + /// Gets the consumer secret. + /// </summary> + string Secret { get; } + + /// <summary> + /// Gets the callback URI that this consumer has pre-registered with the service provider, if any. + /// </summary> + /// <value>A URI that user authorization responses should be directed to; or <c>null</c> if no preregistered callback was arranged.</value> + Uri Callback { get; } + } +} diff --git a/src/DotNetOpenAuth/OAuth2/OAuthUtilities.cs b/src/DotNetOpenAuth/OAuth2/OAuthUtilities.cs index fba80b5..ccc7e8d 100644 --- a/src/DotNetOpenAuth/OAuth2/OAuthUtilities.cs +++ b/src/DotNetOpenAuth/OAuth2/OAuthUtilities.cs @@ -13,7 +13,6 @@ namespace DotNetOpenAuth.OAuth2 { using System.Net; using System.Text; using DotNetOpenAuth.Messaging; - using DotNetOpenAuth.OAuth.ChannelElements; /// <summary> /// Some common utility methods for OAuth 2.0. @@ -41,7 +40,7 @@ namespace DotNetOpenAuth.OAuth2 { /// <returns>The client information. Never null.</returns> internal static IConsumerDescription GetClientOrThrow(this IAuthorizationServer authorizationServer, string clientIdentifier) { Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(clientIdentifier)); - Contract.Ensures(Contract.Result<DotNetOpenAuth.OAuth.ChannelElements.IConsumerDescription>() != null); + Contract.Ensures(Contract.Result<IConsumerDescription>() != null); try { return authorizationServer.GetClient(clientIdentifier); |