11//-----------------------------------------------------------------------
2- // <copyright file="ClientCredentialReader .cs" company="Andrew Arnott">
2+ // <copyright file="ClientAuthenticationModuleBase .cs" company="Andrew Arnott">
33// Copyright (c) Andrew Arnott. All rights reserved.
44// </copyright>
55//-----------------------------------------------------------------------
@@ -14,16 +14,41 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
1414 using DotNetOpenAuth . Messaging ;
1515 using DotNetOpenAuth . OAuth2 . Messages ;
1616
17+ /// <summary>
18+ /// A convenient base class for imlementations of the <see cref="IClientAuthenticationModule"/> interface.
19+ /// </summary>
1720 public abstract class ClientAuthenticationModuleBase : IClientAuthenticationModule {
21+ /// <summary>
22+ /// Initializes a new instance of the <see cref="ClientAuthenticationModuleBase"/> class.
23+ /// </summary>
1824 protected ClientAuthenticationModuleBase ( ) {
1925 }
2026
27+ /// <summary>
28+ /// Attempts to extract client identification/authentication information from a message.
29+ /// </summary>
30+ /// <param name="requestMessage">The incoming message.</param>
31+ /// <param name="clientIdentifier">Receives the client identifier, if one was found.</param>
32+ /// <returns>The level of the extracted client information.</returns>
2133 public abstract ClientAuthenticationResult TryAuthenticateClient ( AuthenticatedClientRequestBase requestMessage , out string clientIdentifier ) ;
2234
35+ /// <summary>
36+ /// Attempts to extract client identification/authentication information from a message.
37+ /// </summary>
38+ /// <param name="requestMessage">The incoming message. Always an instance of <see cref="AuthenticatedClientRequestBase"/></param>
39+ /// <param name="clientIdentifier">Receives the client identifier, if one was found.</param>
40+ /// <returns>The level of the extracted client information.</returns>
2341 public ClientAuthenticationResult TryAuthenticateClient ( IDirectedProtocolMessage requestMessage , out string clientIdentifier ) {
2442 return this . TryAuthenticateClient ( ( AuthenticatedClientRequestBase ) requestMessage , out clientIdentifier ) ;
2543 }
2644
45+ /// <summary>
46+ /// Validates a client identifier and shared secret against the authoriation server's database.
47+ /// </summary>
48+ /// <param name="authorizationServerHost">The authorization server host; cannot be <c>null</c>.</param>
49+ /// <param name="clientIdentifier">The alleged client identifier.</param>
50+ /// <param name="clientSecret">The alleged client secret to be verified.</param>
51+ /// <returns>An indication as to the outcome of the validation.</returns>
2752 protected static ClientAuthenticationResult TryAuthenticateClient ( IAuthorizationServerHost authorizationServerHost , string clientIdentifier , string clientSecret ) {
2853 Requires . NotNull ( authorizationServerHost , "authorizationServerHost" ) ;
2954
0 commit comments