@@ -11,48 +11,23 @@ namespace ModelContextProtocol.Auth;
1111/// <summary>
1212/// Provides functionality for OAuth authentication in MCP clients.
1313/// </summary>
14- public class OAuthAuthenticationService
14+ public partial class OAuthService
1515{
1616 private static readonly HttpClient _httpClient = new ( ) ;
1717 private readonly Func < Uri , Task < string > > ? _authorizationHandler ;
1818
1919 /// <summary>
20- /// Represents the PKCE code challenge and verifier for an authorization flow .
20+ /// Initializes a new instance of the <see cref="OAuthService"/> class .
2121 /// </summary>
22- public class PkceValues
23- {
24- /// <summary>
25- /// The code verifier used to generate the code challenge.
26- /// </summary>
27- public string CodeVerifier { get ; }
28-
29- /// <summary>
30- /// The code challenge sent to the authorization server.
31- /// </summary>
32- public string CodeChallenge { get ; }
33-
34- /// <summary>
35- /// Initializes a new instance of the <see cref="PkceValues"/> class.
36- /// </summary>
37- public PkceValues ( string codeVerifier , string codeChallenge )
38- {
39- CodeVerifier = codeVerifier ;
40- CodeChallenge = codeChallenge ;
41- }
42- }
43-
44- /// <summary>
45- /// Initializes a new instance of the <see cref="OAuthAuthenticationService"/> class.
46- /// </summary>
47- public OAuthAuthenticationService ( )
22+ public OAuthService ( )
4823 {
4924 }
5025
5126 /// <summary>
52- /// Initializes a new instance of the <see cref="OAuthAuthenticationService "/> class with an authorization handler.
27+ /// Initializes a new instance of the <see cref="OAuthService "/> class with an authorization handler.
5328 /// </summary>
5429 /// <param name="authorizationHandler">A handler to invoke when authorization is required.</param>
55- public OAuthAuthenticationService ( Func < Uri , Task < string > > authorizationHandler )
30+ public OAuthService ( Func < Uri , Task < string > > authorizationHandler )
5631 {
5732 _authorizationHandler = authorizationHandler ?? throw new ArgumentNullException ( nameof ( authorizationHandler ) ) ;
5833 }
0 commit comments