summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerUtilities.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs6
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthServerBindingElementBase.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthorizationCode.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/IOAuth2ChannelWithAuthorizationServer.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/MessageValidationBindingElement.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs6
-rw-r--r--src/DotNetOpenAuth.OAuth2.ClientAuthorization/DotNetOpenAuth.OAuth2.ClientAuthorization.csproj2
-rw-r--r--src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IAuthorizationServerHost.cs (renamed from src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IAuthorizationServer.cs)22
-rw-r--r--src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuth2AuthServerChannel.cs2
-rw-r--r--src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs2
-rw-r--r--src/DotNetOpenAuth.Test/OAuth2/OAuth2Coordinator.cs4
-rw-r--r--src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs6
13 files changed, 30 insertions, 30 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerUtilities.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerUtilities.cs
index dbb1279..cd222e2 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerUtilities.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthServerUtilities.cs
@@ -23,7 +23,7 @@ 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 IClientDescription GetClientOrThrow(this IAuthorizationServer authorizationServer, string clientIdentifier) {
+ internal static IClientDescription GetClientOrThrow(this IAuthorizationServerHost authorizationServer, string clientIdentifier) {
Requires.NotNullOrEmpty(clientIdentifier, "clientIdentifier");
Contract.Ensures(Contract.Result<IClientDescription>() != null);
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs
index c3d1772..682ed22 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/AuthorizationServer.cs
@@ -26,7 +26,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// Initializes a new instance of the <see cref="AuthorizationServer"/> class.
/// </summary>
/// <param name="authorizationServer">The authorization server.</param>
- public AuthorizationServer(IAuthorizationServer authorizationServer) {
+ public AuthorizationServer(IAuthorizationServerHost authorizationServer) {
Requires.NotNull(authorizationServer, "authorizationServer");
this.Channel = new OAuth2AuthorizationServerChannel(authorizationServer);
}
@@ -41,7 +41,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// Gets the authorization server.
/// </summary>
/// <value>The authorization server.</value>
- public IAuthorizationServer AuthorizationServerServices {
+ public IAuthorizationServerHost AuthorizationServerServices {
get { return ((IOAuth2ChannelWithAuthorizationServer)this.Channel).AuthorizationServer; }
}
@@ -112,7 +112,7 @@ namespace DotNetOpenAuth.OAuth2 {
if (this.Channel.TryReadFromRequest(request, out requestMessage)) {
IAccessTokenRequestInternal accessRequestInternal = requestMessage;
accessRequestInternal.AccessTokenCreationParameters = this.AuthorizationServerServices.GetAccessTokenParameters(requestMessage);
- ErrorUtilities.VerifyHost(accessRequestInternal.AccessTokenCreationParameters != null, "IAuthorizationServer.GetAccessTokenParameters must not return null.");
+ ErrorUtilities.VerifyHost(accessRequestInternal.AccessTokenCreationParameters != null, "IAuthorizationServerHost.GetAccessTokenParameters must not return null.");
var successResponseMessage = this.PrepareAccessTokenResponse(requestMessage, accessRequestInternal.AccessTokenCreationParameters.IncludeRefreshToken);
successResponseMessage.Lifetime = accessRequestInternal.AccessTokenCreationParameters.AccessTokenLifetime;
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthServerBindingElementBase.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthServerBindingElementBase.cs
index 49f820d..b66088c 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthServerBindingElementBase.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthServerBindingElementBase.cs
@@ -41,7 +41,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
/// Gets the authorization server hosting this channel.
/// </summary>
/// <value>The authorization server.</value>
- protected IAuthorizationServer AuthorizationServer {
+ protected IAuthorizationServerHost AuthorizationServer {
get { return ((IOAuth2ChannelWithAuthorizationServer)this.Channel).AuthorizationServer; }
}
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthorizationCode.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthorizationCode.cs
index a62403b..853a629 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthorizationCode.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/AuthorizationCode.cs
@@ -65,7 +65,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
/// </summary>
/// <param name="authorizationServer">The authorization server that will be serializing/deserializing this authorization code. Must not be null.</param>
/// <returns>A DataBag formatter.</returns>
- internal static IDataBagFormatter<AuthorizationCode> CreateFormatter(IAuthorizationServer authorizationServer) {
+ internal static IDataBagFormatter<AuthorizationCode> CreateFormatter(IAuthorizationServerHost authorizationServer) {
Requires.NotNull(authorizationServer, "authorizationServer");
Contract.Ensures(Contract.Result<IDataBagFormatter<AuthorizationCode>>() != null);
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/IOAuth2ChannelWithAuthorizationServer.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/IOAuth2ChannelWithAuthorizationServer.cs
index 5fc73ce..ff6d7d1 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/IOAuth2ChannelWithAuthorizationServer.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/IOAuth2ChannelWithAuthorizationServer.cs
@@ -14,6 +14,6 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
/// Gets the authorization server.
/// </summary>
/// <value>The authorization server.</value>
- IAuthorizationServer AuthorizationServer { get; }
+ IAuthorizationServerHost AuthorizationServer { get; }
}
}
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/MessageValidationBindingElement.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/MessageValidationBindingElement.cs
index 23dcbf5..efdbf4d 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/MessageValidationBindingElement.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/MessageValidationBindingElement.cs
@@ -146,7 +146,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
// Make sure the authorization this token represents hasn't already been revoked.
if (!this.AuthorizationServer.IsAuthorizationValid(authCarrier.AuthorizationDescription)) {
- Logger.OAuth.Error("Rejecting access token request because the IAuthorizationServer.IsAuthorizationValid method returned false.");
+ Logger.OAuth.Error("Rejecting access token request because the IAuthorizationServerHost.IsAuthorizationValid method returned false.");
throw new TokenEndpointProtocolException(Protocol.AccessTokenRequestErrorCodes.InvalidGrant);
}
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs
index 00c34eb..bd154bc 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs
@@ -35,7 +35,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
/// Initializes a new instance of the <see cref="OAuth2AuthorizationServerChannel"/> class.
/// </summary>
/// <param name="authorizationServer">The authorization server.</param>
- protected internal OAuth2AuthorizationServerChannel(IAuthorizationServer authorizationServer)
+ protected internal OAuth2AuthorizationServerChannel(IAuthorizationServerHost authorizationServer)
: base(MessageTypes, InitializeBindingElements(authorizationServer)) {
Requires.NotNull(authorizationServer, "authorizationServer");
this.AuthorizationServer = authorizationServer;
@@ -45,7 +45,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
/// Gets the authorization server.
/// </summary>
/// <value>The authorization server.</value>
- public IAuthorizationServer AuthorizationServer { get; private set; }
+ public IAuthorizationServerHost AuthorizationServer { get; private set; }
/// <summary>
/// Gets the protocol message that may be in the given HTTP response.
@@ -109,7 +109,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
/// <returns>
/// An array of binding elements used to initialize the channel.
/// </returns>
- private static IChannelBindingElement[] InitializeBindingElements(IAuthorizationServer authorizationServer) {
+ private static IChannelBindingElement[] InitializeBindingElements(IAuthorizationServerHost authorizationServer) {
Requires.NotNull(authorizationServer, "authorizationServer");
var bindingElements = new List<IChannelBindingElement>();
diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/DotNetOpenAuth.OAuth2.ClientAuthorization.csproj b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/DotNetOpenAuth.OAuth2.ClientAuthorization.csproj
index 53ab1d0..6a13c79 100644
--- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/DotNetOpenAuth.OAuth2.ClientAuthorization.csproj
+++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/DotNetOpenAuth.OAuth2.ClientAuthorization.csproj
@@ -28,7 +28,7 @@
<DependentUpon>ClientAuthorizationStrings.resx</DependentUpon>
</Compile>
<Compile Include="OAuth2\ClientType.cs" />
- <Compile Include="OAuth2\IAuthorizationServer.cs" />
+ <Compile Include="OAuth2\IAuthorizationServerHost.cs" />
<Compile Include="OAuth2\IClientDescription.cs" />
<Compile Include="OAuth2\Messages\AccessTokenAuthorizationCodeRequest.cs" />
<Compile Include="OAuth2\Messages\AccessTokenClientCredentialsRequest.cs" />
diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IAuthorizationServer.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IAuthorizationServerHost.cs
index 605d007..61ba7e2 100644
--- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IAuthorizationServer.cs
+++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IAuthorizationServerHost.cs
@@ -1,5 +1,5 @@
//-----------------------------------------------------------------------
-// <copyright file="IAuthorizationServer.cs" company="Outercurve Foundation">
+// <copyright file="IAuthorizationServerHost.cs" company="Outercurve Foundation">
// Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
@@ -20,7 +20,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// Provides host-specific authorization server services needed by this library.
/// </summary>
[ContractClass(typeof(IAuthorizationServerContract))]
- public interface IAuthorizationServer {
+ public interface IAuthorizationServerHost {
/// <summary>
/// Gets the store for storing crypto keys used to symmetrically encrypt and sign authorization codes and refresh tokens.
/// </summary>
@@ -92,10 +92,10 @@ namespace DotNetOpenAuth.OAuth2 {
}
/// <summary>
- /// Code Contract for the <see cref="IAuthorizationServer"/> interface.
+ /// Code Contract for the <see cref="IAuthorizationServerHost"/> interface.
/// </summary>
- [ContractClassFor(typeof(IAuthorizationServer))]
- internal abstract class IAuthorizationServerContract : IAuthorizationServer {
+ [ContractClassFor(typeof(IAuthorizationServerHost))]
+ internal abstract class IAuthorizationServerContract : IAuthorizationServerHost {
/// <summary>
/// Prevents a default instance of the <see cref="IAuthorizationServerContract"/> class from being created.
/// </summary>
@@ -105,7 +105,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <summary>
/// Gets the store for storeing crypto keys used to symmetrically encrypt and sign authorization codes and refresh tokens.
/// </summary>
- ICryptoKeyStore IAuthorizationServer.CryptoKeyStore {
+ ICryptoKeyStore IAuthorizationServerHost.CryptoKeyStore {
get {
Contract.Ensures(Contract.Result<ICryptoKeyStore>() != null);
throw new NotImplementedException();
@@ -116,7 +116,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// Gets the authorization code nonce store to use to ensure that authorization codes can only be used once.
/// </summary>
/// <value>The authorization code nonce store.</value>
- INonceStore IAuthorizationServer.NonceStore {
+ INonceStore IAuthorizationServerHost.NonceStore {
get {
Contract.Ensures(Contract.Result<INonceStore>() != null);
throw new NotImplementedException();
@@ -129,7 +129,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>
- IClientDescription IAuthorizationServer.GetClient(string clientIdentifier) {
+ IClientDescription IAuthorizationServerHost.GetClient(string clientIdentifier) {
Requires.NotNullOrEmpty(clientIdentifier, "clientIdentifier");
Contract.Ensures(Contract.Result<IClientDescription>() != null);
throw new NotImplementedException();
@@ -157,7 +157,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// security in the event the user was revoking access in order to sever authorization on a stolen
/// account or piece of hardware in which the tokens were stored. </para>
/// </remarks>
- bool IAuthorizationServer.IsAuthorizationValid(IAuthorizationDescription authorization) {
+ bool IAuthorizationServerHost.IsAuthorizationValid(IAuthorizationDescription authorization) {
Requires.NotNull(authorization, "authorization");
throw new NotImplementedException();
}
@@ -171,7 +171,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <c>true</c> if the given credentials are valid; otherwise, <c>false</c>.
/// </returns>
/// <exception cref="NotSupportedException">May be thrown if the authorization server does not support the resource owner password credential grant type.</exception>
- bool IAuthorizationServer.IsResourceOwnerCredentialValid(string userName, string password) {
+ bool IAuthorizationServerHost.IsResourceOwnerCredentialValid(string userName, string password) {
Contract.Requires(!string.IsNullOrEmpty(userName));
Contract.Requires(password != null);
throw new NotImplementedException();
@@ -187,7 +187,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <returns>
/// A non-null parameters instance that DotNetOpenAuth will dispose after it has been used.
/// </returns>
- AccessTokenParameters IAuthorizationServer.GetAccessTokenParameters(IAccessTokenRequest accessTokenRequestMessage) {
+ AccessTokenParameters IAuthorizationServerHost.GetAccessTokenParameters(IAccessTokenRequest accessTokenRequestMessage) {
Contract.Requires(accessTokenRequestMessage != null);
Contract.Ensures(Contract.Result<AccessTokenParameters>() != null);
throw new NotImplementedException();
diff --git a/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuth2AuthServerChannel.cs b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuth2AuthServerChannel.cs
index 2b087fd..9a5d05e 100644
--- a/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuth2AuthServerChannel.cs
+++ b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuth2AuthServerChannel.cs
@@ -21,7 +21,7 @@ namespace DotNetOpenAuth.Test.Mocks {
this.wrappedChannel = (OAuth2AuthorizationServerChannel)wrappedChannel;
}
- public IAuthorizationServer AuthorizationServer {
+ public IAuthorizationServerHost AuthorizationServer {
get { return this.wrappedChannel.AuthorizationServer; }
}
}
diff --git a/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs b/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs
index b5ee767..89271ae 100644
--- a/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth2/MessageFactoryTests.cs
@@ -28,7 +28,7 @@ namespace DotNetOpenAuth.Test.OAuth2 {
public override void SetUp() {
base.SetUp();
- var authServerChannel = new OAuth2AuthorizationServerChannel(new Mock<IAuthorizationServer>().Object);
+ var authServerChannel = new OAuth2AuthorizationServerChannel(new Mock<IAuthorizationServerHost>().Object);
this.authServerMessageFactory = authServerChannel.MessageFactoryTestHook;
var clientChannel = new OAuth2ClientChannel();
diff --git a/src/DotNetOpenAuth.Test/OAuth2/OAuth2Coordinator.cs b/src/DotNetOpenAuth.Test/OAuth2/OAuth2Coordinator.cs
index 993cad5..ede3258 100644
--- a/src/DotNetOpenAuth.Test/OAuth2/OAuth2Coordinator.cs
+++ b/src/DotNetOpenAuth.Test/OAuth2/OAuth2Coordinator.cs
@@ -15,12 +15,12 @@ namespace DotNetOpenAuth.Test.OAuth2 {
internal class OAuth2Coordinator<TClient> : CoordinatorBase<TClient, AuthorizationServer>
where TClient : ClientBase {
private readonly AuthorizationServerDescription serverDescription;
- private readonly IAuthorizationServer authServerHost;
+ private readonly IAuthorizationServerHost authServerHost;
private readonly TClient client;
internal OAuth2Coordinator(
AuthorizationServerDescription serverDescription,
- IAuthorizationServer authServerHost,
+ IAuthorizationServerHost authServerHost,
TClient client,
Action<TClient> clientAction,
Action<AuthorizationServer> authServerAction)
diff --git a/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs b/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs
index ed6ce70..c84e2c1 100644
--- a/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs
+++ b/src/DotNetOpenAuth.Test/OAuth2/OAuth2TestBase.cs
@@ -39,10 +39,10 @@ namespace DotNetOpenAuth.Test.OAuth2 {
ClientCallback,
ClientType.Confidential);
- protected static readonly IAuthorizationServer AuthorizationServerMock = CreateAuthorizationServerMock().Object;
+ protected static readonly IAuthorizationServerHost AuthorizationServerMock = CreateAuthorizationServerMock().Object;
- protected static Mock<IAuthorizationServer> CreateAuthorizationServerMock() {
- var authHostMock = new Mock<IAuthorizationServer>();
+ protected static Mock<IAuthorizationServerHost> CreateAuthorizationServerMock() {
+ var authHostMock = new Mock<IAuthorizationServerHost>();
var cryptoStore = new MemoryCryptoKeyStore();
authHostMock.Setup(m => m.GetClient(ClientId)).Returns(ClientDescription);
authHostMock.SetupGet(m => m.CryptoKeyStore).Returns(cryptoStore);