This repository was archived by the owner on Sep 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
clients/ConsoleClientWithBrowser Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1 </TargetFramework >
4+ <TargetFramework >net6.0 </TargetFramework >
55 <OutputType >Exe</OutputType >
66 </PropertyGroup >
77
1212
1313 <ItemGroup >
1414 <FrameworkReference Include =" Microsoft.AspNetCore.App" />
15- <PackageReference Include =" Serilog.Extensions.Logging" Version =" 3.0.1 " />
15+ <PackageReference Include =" Serilog.Extensions.Logging" Version =" 3.1.0 " />
1616 <PackageReference Include =" Serilog.Sinks.Console" Version =" 3.1.1" />
1717 </ItemGroup >
1818
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ namespace ConsoleClientWithBrowser
1111{
1212 public class Program
1313 {
14- static string _authority = "https://demo.identityserver.io " ;
15- static string _api = "https://demo.identityserver.io /api/test" ;
14+ static string _authority = "https://demo.duendesoftware.com " ;
15+ static string _api = "https://demo.duendesoftware.com /api/test" ;
1616
1717 static OidcClient _oidcClient ;
1818 static HttpClient _apiClient = new HttpClient { BaseAddress = new Uri ( _api ) } ;
@@ -46,7 +46,7 @@ private static async Task SignIn()
4646
4747 Browser = browser ,
4848 IdentityTokenValidator = new JwtHandlerIdentityTokenValidator ( ) ,
49- RefreshTokenInnerHttpHandler = new HttpClientHandler ( )
49+ RefreshTokenInnerHttpHandler = new SocketsHttpHandler ( )
5050 } ;
5151
5252 var serilog = new LoggerConfiguration ( )
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ void Configure(IApplicationBuilder app)
139139 {
140140 if ( ctx . Request . Method == "GET" )
141141 {
142- SetResult ( ctx . Request . QueryString . Value , ctx ) ;
142+ await SetResultAsync ( ctx . Request . QueryString . Value , ctx ) ;
143143 }
144144 else
145145 {
@@ -148,23 +148,23 @@ void Configure(IApplicationBuilder app)
148148 } ) ;
149149 }
150150
151- private void SetResult ( string value , HttpContext ctx )
151+ private async Task SetResultAsync ( string value , HttpContext ctx )
152152 {
153153 _source . TrySetResult ( value ) ;
154154
155155 try
156156 {
157157 ctx . Response . StatusCode = 200 ;
158158 ctx . Response . ContentType = "text/html" ;
159- ctx . Response . WriteAsync ( "<h1>You can now return to the application.</h1>" ) ;
160- ctx . Response . Body . Flush ( ) ;
159+ await ctx . Response . WriteAsync ( "<h1>You can now return to the application.</h1>" ) ;
160+ await ctx . Response . Body . FlushAsync ( ) ;
161161 }
162162 catch
163163 {
164164 ctx . Response . StatusCode = 400 ;
165165 ctx . Response . ContentType = "text/html" ;
166- ctx . Response . WriteAsync ( "<h1>Invalid request.</h1>" ) ;
167- ctx . Response . Body . Flush ( ) ;
166+ await ctx . Response . WriteAsync ( "<h1>Invalid request.</h1>" ) ;
167+ await ctx . Response . Body . FlushAsync ( ) ;
168168 }
169169 }
170170
You can’t perform that action at this time.
0 commit comments