This repository was archived by the owner on Sep 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +11
-6
lines changed
ConsoleClientWithBrowserAndDPoP Expand file tree Collapse file tree 8 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 55using System . Net . Http ;
66using System . Text . Json ;
77using System . Threading . Tasks ;
8+ using Microsoft . Extensions . Logging ;
89using Serilog . Sinks . SystemConsole . Themes ;
910
1011namespace ConsoleClientWithBrowser
@@ -54,7 +55,7 @@ private static async Task SignIn()
5455 . WriteTo . Console ( outputTemplate : "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message}{NewLine}{Exception}{NewLine}" , theme : AnsiConsoleTheme . Code )
5556 . CreateLogger ( ) ;
5657
57- options . LoggerFactory . AddSerilog ( serilog ) ;
58+ options . LoggerFactory = new LoggerFactory ( ) . AddSerilog ( serilog ) ;
5859
5960 _oidcClient = new OidcClient ( options ) ;
6061 var result = await _oidcClient . LoginAsync ( new LoginRequest ( ) ) ;
Original file line number Diff line number Diff line change 88using System . Threading . Tasks ;
99using Serilog . Sinks . SystemConsole . Themes ;
1010using IdentityModel . OidcClient . DPoP ;
11+ using Microsoft . Extensions . Logging ;
1112
1213namespace ConsoleClientWithBrowserAndDPoP
1314{
@@ -57,7 +58,7 @@ private static async Task SignIn()
5758 . WriteTo . Console ( outputTemplate : "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message}{NewLine}{Exception}{NewLine}" , theme : AnsiConsoleTheme . Code )
5859 . CreateLogger ( ) ;
5960
60- options . LoggerFactory . AddSerilog ( serilog ) ;
61+ options . LoggerFactory = new LoggerFactory ( ) . AddSerilog ( serilog ) ;
6162
6263 _oidcClient = new OidcClient ( options ) ;
6364
Original file line number Diff line number Diff line change 4444 <PackageReference Include =" minver" Version =" 4.3.0" PrivateAssets =" All" />
4545 <PackageReference Include =" System.IdentityModel.Tokens.Jwt" Version =" 6.30.0" />
4646
47- <PackageReference Include =" Microsoft.Extensions.Logging" Version =" 6 .0.0" />
47+ <PackageReference Include =" Microsoft.Extensions.Logging.Abstractions " Version =" 8 .0.0" />
4848 <PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.1.1" PrivateAssets =" All" />
4949 </ItemGroup >
5050
Original file line number Diff line number Diff line change 3939 <PackageReference Include =" minver" Version =" 4.3.0" PrivateAssets =" All" />
4040
4141 <PackageReference Include =" System.IdentityModel.Tokens.Jwt" Version =" 6.30.0" />
42- <PackageReference Include =" Microsoft.Extensions.Logging" Version =" 6 .0.0" />
42+ <PackageReference Include =" Microsoft.Extensions.Logging.Abstractions " Version =" 8 .0.0" />
4343 <PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.1.1" PrivateAssets =" All" />
4444 </ItemGroup >
4545
Original file line number Diff line number Diff line change 4545 <PackageReference Include =" IdentityModel" Version =" 6.2.0" />
4646 <PackageReference Include =" minver" Version =" 4.3.0" PrivateAssets =" All" />
4747
48- <PackageReference Include =" Microsoft.Extensions.Logging" Version =" 6 .0.0" />
48+ <PackageReference Include =" Microsoft.Extensions.Logging.Abstractions " Version =" 8 .0.0" />
4949 <PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.1.1" PrivateAssets =" All" />
5050 </ItemGroup >
5151
Original file line number Diff line number Diff line change 99using System . Collections . Generic ;
1010using System . Net . Http ;
1111using System . Text . Json . Serialization ;
12+ using Microsoft . Extensions . Logging . Abstractions ;
1213
1314namespace IdentityModel . OidcClient
1415{
@@ -212,7 +213,7 @@ public class OidcClientOptions
212213 /// The logger factory.
213214 /// </value>
214215 [ JsonIgnore ]
215- public ILoggerFactory LoggerFactory { get ; set ; } = new LoggerFactory ( ) ;
216+ public ILoggerFactory LoggerFactory { get ; set ; } = new NullLoggerFactory ( ) ;
216217
217218 /// <summary>
218219 /// Gets or sets the identity token validator.
Original file line number Diff line number Diff line change 2020 <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.3" />
2121 <PackageReference Include =" xunit" Version =" 2.4.1" />
2222 <PackageReference Include =" FluentAssertions" Version =" 5.10.2" />
23+ <PackageReference Include =" Microsoft.Extensions.Primitives" Version =" 8.0.0" />
2324 </ItemGroup >
2425</Project >
Original file line number Diff line number Diff line change 1919 <PackageReference Include =" System.IdentityModel.Tokens.Jwt" Version =" 6.12.0" />
2020
2121 <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.9.4" />
22+ <PackageReference Include =" Microsoft.Extensions.Primitives" Version =" 8.0.0" />
2223 <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.3" />
2324 <PackageReference Include =" xunit" Version =" 2.4.1" />
2425 <PackageReference Include =" FluentAssertions" Version =" 5.10.3" />
You can’t perform that action at this time.
0 commit comments