summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/ClientCredentialMessagePartReader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/ClientCredentialMessagePartReader.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/ClientCredentialMessagePartReader.cs23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/ClientCredentialMessagePartReader.cs b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/ClientCredentialMessagePartReader.cs
index 2df68a6..6579df2 100644
--- a/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/ClientCredentialMessagePartReader.cs
+++ b/src/DotNetOpenAuth.OAuth2.AuthorizationServer/OAuth2/ChannelElements/ClientCredentialMessagePartReader.cs
@@ -15,31 +15,20 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
/// <summary>
/// Reads client authentication information from the message payload itself (POST entity as a URI-encoded parameter).
/// </summary>
- public class ClientCredentialMessagePartReader : ClientAuthenticationModuleBase {
- /// <summary>
- /// The authorization server host.
- /// </summary>
- private readonly IAuthorizationServerHost authorizationServerHost;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ClientCredentialMessagePartReader"/> class.
- /// </summary>
- /// <param name="authorizationServerHost">The authorization server host.</param>
- public ClientCredentialMessagePartReader(IAuthorizationServerHost authorizationServerHost) {
- Requires.NotNull(authorizationServerHost, "authorizationServerHost");
- this.authorizationServerHost = authorizationServerHost;
- }
-
+ public class ClientCredentialMessagePartReader : ClientAuthenticationModule {
/// <summary>
/// Attempts to extract client identification/authentication information from a message.
/// </summary>
+ /// <param name="authorizationServerHost">The authorization server host.</param>
/// <param name="requestMessage">The incoming message.</param>
/// <param name="clientIdentifier">Receives the client identifier, if one was found.</param>
/// <returns>The level of the extracted client information.</returns>
- public override ClientAuthenticationResult TryAuthenticateClient(AuthenticatedClientRequestBase requestMessage, out string clientIdentifier) {
+ public override ClientAuthenticationResult TryAuthenticateClient(IAuthorizationServerHost authorizationServerHost, AuthenticatedClientRequestBase requestMessage, out string clientIdentifier) {
+ Requires.NotNull(authorizationServerHost, "authorizationServerHost");
Requires.NotNull(requestMessage, "requestMessage");
+
clientIdentifier = requestMessage.ClientIdentifier;
- return TryAuthenticateClient(this.authorizationServerHost, requestMessage.ClientIdentifier, requestMessage.ClientSecret);
+ return TryAuthenticateClient(authorizationServerHost, requestMessage.ClientIdentifier, requestMessage.ClientSecret);
}
}
}