Skip to content

Commit

Permalink
[SDK-3651] Expose OidcClient LoggerFactory (#233)
Browse files Browse the repository at this point in the history
* Expose OidcClient LoggerFactory

* Fix typo
  • Loading branch information
frederikprijck authored Oct 4, 2022
1 parent 07f8a87 commit 7df0c7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Auth0.OidcClient.Core/Auth0ClientBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ private OidcClientOptions CreateOidcClientOptions(Auth0ClientOptions options)
RedirectUri = options.RedirectUri ?? $"https://{_options.Domain}/mobile",
PostLogoutRedirectUri = options.PostLogoutRedirectUri ?? $"https://{_options.Domain}/mobile",
ClockSkew = options.Leeway,
LoggerFactory = options.LoggerFactory,

Policy = {
RequireAccessTokenHash = false
Expand Down
6 changes: 6 additions & 0 deletions src/Auth0.OidcClient.Core/Auth0ClientOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using IdentityModel.OidcClient.Browser;
using Microsoft.Extensions.Logging;
using System;
using System.Net.Http;

Expand Down Expand Up @@ -116,6 +117,11 @@ public class Auth0ClientOptions
/// </summary>
public TimeSpan? MaxAge { get; set; }

/// <summary>
/// Optional ILoggerFactory implementation to use for logging purposes.
/// </summary>
public ILoggerFactory LoggerFactory { get; set; } = new LoggerFactory();

/// <summary>
/// Create a new instance of the <see cref="Auth0ClientOptions"/> class used to configure options for
/// <see cref="Auth0ClientBase"/> implementations by way of their constructors.
Expand Down

0 comments on commit 7df0c7c

Please sign in to comment.