From af6dcfb1f3019f796b313c8e76b116a036bb5255 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 7 May 2019 09:47:20 +0800 Subject: [PATCH] Replace IIdentityModelHttpClientAuthenticator with IIdentityModelAuthenticationService. fix #1098 --- .../ConsoleClientDemo/ClientDemoService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs index 1560c383d1..43a36383fd 100644 --- a/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs +++ b/samples/MicroserviceDemo/applications/ConsoleClientDemo/ClientDemoService.cs @@ -14,13 +14,13 @@ namespace ConsoleClientDemo { private readonly IIdentityUserAppService _userAppService; private readonly IProductAppService _productAppService; - private readonly IIdentityModelHttpClientAuthenticator _authenticator; + private readonly IIdentityModelAuthenticationService _authenticator; private readonly RemoteServiceOptions _remoteServiceOptions; public ClientDemoService( IIdentityUserAppService userAppService, IProductAppService productAppService, - IIdentityModelHttpClientAuthenticator authenticator, + IIdentityModelAuthenticationService authenticator, IOptions remoteServiceOptions) { _userAppService = userAppService; @@ -38,7 +38,7 @@ namespace ConsoleClientDemo /// /// Shows how to manually create an HttpClient and authenticate using the - /// IIdentityModelHttpClientAuthenticator service. + /// IIdentityModelAuthenticationService service. /// private async Task TestWithHttpClient() { @@ -49,7 +49,7 @@ namespace ConsoleClientDemo { using (var client = new HttpClient()) { - await _authenticator.AuthenticateAsync(client); + await _authenticator.TryAuthenticateAsync(client); var url = GetServerUrl() + "Test/Index"; @@ -75,7 +75,7 @@ namespace ConsoleClientDemo /// /// Shows how to use application service interfaces (IIdentityUserAppService in this sample) /// to call a remote service which is possible by the dynamic http client proxy system. - /// No need to use IIdentityModelHttpClientAuthenticator since the dynamic http client proxy + /// No need to use IIdentityModelAuthenticationService since the dynamic http client proxy /// system internally uses it. You just inject a service (IIdentityUserAppService) /// and call a method (GetListAsync) like a local method. /// @@ -104,7 +104,7 @@ namespace ConsoleClientDemo /// /// Shows how to use application service interfaces (IProductAppService in this sample) /// to call a remote service which is possible by the dynamic http client proxy system. - /// No need to use IIdentityModelHttpClientAuthenticator since the dynamic http client proxy + /// No need to use IIdentityModelAuthenticationService since the dynamic http client proxy /// system internally uses it. You just inject a service (IProductAppService) /// and call a method (GetListAsync) like a local method. ///