summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--projecttemplates/RelyingPartyLogic/Model.Client.cs8
-rw-r--r--projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs2
-rw-r--r--samples/OAuthAuthorizationServer/Code/Client.cs8
-rw-r--r--samples/OAuthAuthorizationServer/Code/OAuth2AuthorizationServer.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2/DotNetOpenAuth.OAuth2.csproj2
-rw-r--r--src/DotNetOpenAuth.OAuth2/OAuth2/IAuthorizationServer.cs6
-rw-r--r--src/DotNetOpenAuth.OAuth2/OAuth2/IClientDescription.cs (renamed from src/DotNetOpenAuth.OAuth2/OAuth2/IConsumerDescription.cs)20
-rw-r--r--src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs4
8 files changed, 26 insertions, 26 deletions
diff --git a/projecttemplates/RelyingPartyLogic/Model.Client.cs b/projecttemplates/RelyingPartyLogic/Model.Client.cs
index 0052b0c..42f6274 100644
--- a/projecttemplates/RelyingPartyLogic/Model.Client.cs
+++ b/projecttemplates/RelyingPartyLogic/Model.Client.cs
@@ -10,13 +10,13 @@ namespace RelyingPartyLogic {
using DotNetOpenAuth.OAuth2;
- public partial class Client : IConsumerDescription {
+ public partial class Client : IClientDescription {
#region IConsumerDescription Members
/// <summary>
/// Gets the client secret.
/// </summary>
- string IConsumerDescription.Secret {
+ string IClientDescription.Secret {
get { return this.ClientSecret; }
}
@@ -27,7 +27,7 @@ namespace RelyingPartyLogic {
/// <value>
/// An absolute URL; or <c>null</c> if none is registered.
/// </value>
- Uri IConsumerDescription.DefaultCallback {
+ Uri IClientDescription.DefaultCallback {
get { return string.IsNullOrEmpty(this.CallbackAsString) ? null : new Uri(this.CallbackAsString); }
}
@@ -39,7 +39,7 @@ namespace RelyingPartyLogic {
/// <returns>
/// <c>true</c> if the callback URL is allowable for this client; otherwise, <c>false</c>.
/// </returns>
- bool IConsumerDescription.IsCallbackAllowed(Uri callback) {
+ bool IClientDescription.IsCallbackAllowed(Uri callback) {
return string.IsNullOrEmpty(this.CallbackAsString) || callback == new Uri(this.CallbackAsString);
}
diff --git a/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs b/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
index b9a75e5..3f0c48d 100644
--- a/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
+++ b/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
@@ -95,7 +95,7 @@ namespace RelyingPartyLogic {
/// <param name="clientIdentifier">The client identifier.</param>
/// <returns>The client registration. Never null.</returns>
/// <exception cref="ArgumentException">Thrown when no client with the given identifier is registered with this authorization server.</exception>
- public IConsumerDescription GetClient(string clientIdentifier) {
+ public IClientDescription GetClient(string clientIdentifier) {
try {
return Database.DataContext.Clients.First(c => c.ClientIdentifier == clientIdentifier);
} catch (InvalidOperationException ex) {
diff --git a/samples/OAuthAuthorizationServer/Code/Client.cs b/samples/OAuthAuthorizationServer/Code/Client.cs
index b32bb15..ce52008 100644
--- a/samples/OAuthAuthorizationServer/Code/Client.cs
+++ b/samples/OAuthAuthorizationServer/Code/Client.cs
@@ -7,13 +7,13 @@
/// <summary>
/// An OAuth 2.0 Client that has registered with this Authorization Server.
/// </summary>
- public partial class Client : IConsumerDescription {
+ public partial class Client : IClientDescription {
#region IConsumerDescription Members
/// <summary>
/// Gets the client secret.
/// </summary>
- string IConsumerDescription.Secret {
+ string IClientDescription.Secret {
get { return this.ClientSecret; }
}
@@ -24,7 +24,7 @@
/// <value>
/// An absolute URL; or <c>null</c> if none is registered.
/// </value>
- Uri IConsumerDescription.DefaultCallback {
+ Uri IClientDescription.DefaultCallback {
get { return string.IsNullOrEmpty(this.Callback) ? null : new Uri(this.Callback); }
}
@@ -36,7 +36,7 @@
/// <returns>
/// <c>true</c> if the callback URL is allowable for this client; otherwise, <c>false</c>.
/// </returns>
- bool IConsumerDescription.IsCallbackAllowed(Uri callback) {
+ bool IClientDescription.IsCallbackAllowed(Uri callback) {
if (string.IsNullOrEmpty(this.Callback)) {
// No callback rules have been set up for this client.
return true;
diff --git a/samples/OAuthAuthorizationServer/Code/OAuth2AuthorizationServer.cs b/samples/OAuthAuthorizationServer/Code/OAuth2AuthorizationServer.cs
index 2bee7ba..f515949 100644
--- a/samples/OAuthAuthorizationServer/Code/OAuth2AuthorizationServer.cs
+++ b/samples/OAuthAuthorizationServer/Code/OAuth2AuthorizationServer.cs
@@ -70,7 +70,7 @@
return resourceServerEncryptionKey;
}
- public IConsumerDescription GetClient(string clientIdentifier) {
+ public IClientDescription GetClient(string clientIdentifier) {
var consumerRow = MvcApplication.DataContext.Clients.SingleOrDefault(
consumerCandidate => consumerCandidate.ClientIdentifier == clientIdentifier);
if (consumerRow == null) {
diff --git a/src/DotNetOpenAuth.OAuth2/DotNetOpenAuth.OAuth2.csproj b/src/DotNetOpenAuth.OAuth2/DotNetOpenAuth.OAuth2.csproj
index bac982f..2031019 100644
--- a/src/DotNetOpenAuth.OAuth2/DotNetOpenAuth.OAuth2.csproj
+++ b/src/DotNetOpenAuth.OAuth2/DotNetOpenAuth.OAuth2.csproj
@@ -40,7 +40,7 @@
<Compile Include="OAuth2\IAuthorizationServer.cs" />
<Compile Include="OAuth2\IAuthorizationState.cs" />
<Compile Include="OAuth2\IClientAuthorizationTracker.cs" />
- <Compile Include="OAuth2\IConsumerDescription.cs" />
+ <Compile Include="OAuth2\IClientDescription.cs" />
<Compile Include="OAuth2\Messages\AccessProtectedResourceRequest.cs" />
<Compile Include="OAuth2\Messages\AccessTokenAuthorizationCodeRequest.cs" />
<Compile Include="OAuth2\Messages\AccessTokenResourceOwnerPasswordCredentialsRequest.cs" />
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/IAuthorizationServer.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/IAuthorizationServer.cs
index 23c4a75..9c2888f 100644
--- a/src/DotNetOpenAuth.OAuth2/OAuth2/IAuthorizationServer.cs
+++ b/src/DotNetOpenAuth.OAuth2/OAuth2/IAuthorizationServer.cs
@@ -88,7 +88,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <param name="clientIdentifier">The client identifier.</param>
/// <returns>The client registration. Never null.</returns>
/// <exception cref="ArgumentException">Thrown when no client with the given identifier is registered with this authorization server.</exception>
- IConsumerDescription GetClient(string clientIdentifier);
+ IClientDescription GetClient(string clientIdentifier);
/// <summary>
/// Determines whether a described authorization is (still) valid.
@@ -202,9 +202,9 @@ namespace DotNetOpenAuth.OAuth2 {
/// <param name="clientIdentifier">The client identifier.</param>
/// <returns>The client registration. Never null.</returns>
/// <exception cref="ArgumentException">Thrown when no client with the given identifier is registered with this authorization server.</exception>
- IConsumerDescription IAuthorizationServer.GetClient(string clientIdentifier) {
+ IClientDescription IAuthorizationServer.GetClient(string clientIdentifier) {
Requires.NotNullOrEmpty(clientIdentifier, "clientIdentifier");
- Contract.Ensures(Contract.Result<IConsumerDescription>() != null);
+ Contract.Ensures(Contract.Result<IClientDescription>() != null);
throw new NotImplementedException();
}
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/IConsumerDescription.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/IClientDescription.cs
index 47073e8..84eb6b6 100644
--- a/src/DotNetOpenAuth.OAuth2/OAuth2/IConsumerDescription.cs
+++ b/src/DotNetOpenAuth.OAuth2/OAuth2/IClientDescription.cs
@@ -1,5 +1,5 @@
//-----------------------------------------------------------------------
-// <copyright file="IConsumerDescription.cs" company="Outercurve Foundation">
+// <copyright file="IClientDescription.cs" company="Outercurve Foundation">
// Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
@@ -12,8 +12,8 @@ namespace DotNetOpenAuth.OAuth2 {
/// <summary>
/// A description of a client from an Authorization Server's point of view.
/// </summary>
- [ContractClass(typeof(IConsumerDescriptionContract))]
- public interface IConsumerDescription {
+ [ContractClass(typeof(IClientDescriptionContract))]
+ public interface IClientDescription {
/// <summary>
/// Gets the client secret.
/// </summary>
@@ -54,17 +54,17 @@ namespace DotNetOpenAuth.OAuth2 {
}
/// <summary>
- /// Contract class for the <see cref="IConsumerDescription"/> interface.
+ /// Contract class for the <see cref="IClientDescription"/> interface.
/// </summary>
- [ContractClassFor(typeof(IConsumerDescription))]
- internal abstract class IConsumerDescriptionContract : IConsumerDescription {
- #region IConsumerDescription Members
+ [ContractClassFor(typeof(IClientDescription))]
+ internal abstract class IClientDescriptionContract : IClientDescription {
+ #region IClientDescription Members
/// <summary>
/// Gets the client secret.
/// </summary>
/// <value></value>
- string IConsumerDescription.Secret {
+ string IClientDescription.Secret {
get { throw new NotImplementedException(); }
}
@@ -75,7 +75,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <value>
/// An absolute URL; or <c>null</c> if none is registered.
/// </value>
- Uri IConsumerDescription.DefaultCallback {
+ Uri IClientDescription.DefaultCallback {
get {
Contract.Ensures(Contract.Result<Uri>() == null || Contract.Result<Uri>().IsAbsoluteUri);
throw new NotImplementedException();
@@ -90,7 +90,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <returns>
/// <c>true</c> if the callback is allowed; otherwise, <c>false</c>.
/// </returns>
- bool IConsumerDescription.IsCallbackAllowed(Uri callback) {
+ bool IClientDescription.IsCallbackAllowed(Uri callback) {
Requires.NotNull(callback, "callback");
Requires.True(callback.IsAbsoluteUri, "callback");
throw new NotImplementedException();
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs
index f3bceda..a032ed5 100644
--- a/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs
+++ b/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs
@@ -107,9 +107,9 @@ namespace DotNetOpenAuth.OAuth2 {
/// <param name="authorizationServer">The authorization server.</param>
/// <param name="clientIdentifier">The client identifier.</param>
/// <returns>The client information. Never null.</returns>
- internal static IConsumerDescription GetClientOrThrow(this IAuthorizationServer authorizationServer, string clientIdentifier) {
+ internal static IClientDescription GetClientOrThrow(this IAuthorizationServer authorizationServer, string clientIdentifier) {
Requires.NotNullOrEmpty(clientIdentifier, "clientIdentifier");
- Contract.Ensures(Contract.Result<IConsumerDescription>() != null);
+ Contract.Ensures(Contract.Result<IClientDescription>() != null);
try {
return authorizationServer.GetClient(clientIdentifier);