Skip to content

Commit

Permalink
Add logger (#484)
Browse files Browse the repository at this point in the history
* Add logger

* Add logger for v6

---------

Co-authored-by: Roland Guijt <[email protected]>
  • Loading branch information
RolandGuijt and Roland Guijt committed Jun 19, 2024
1 parent acedc92 commit 62079b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions IdentityServer/v6/docs/content/ui/login/dynamicproviders.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ For example:
```cs
class CustomOidcConfigureOptions : ConfigureAuthenticationOptions<OpenIdConnectOptions, OidcProvider>
{
public CustomOidcConfigureOptions(IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor)
public CustomOidcConfigureOptions(IHttpContextAccessor httpContextAccessor,
ILogger<CustomOidcConfigureOptions> logger) : base(httpContextAccessor, logger)
{
}

Expand All @@ -131,7 +132,7 @@ class CustomOidcConfigureOptions : ConfigureAuthenticationOptions<OpenIdConnectO
The above class would need to be configured in DI (as before):

```cs
public void Configure(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.ConfigureOptions<CustomOidcConfigureOptions>();
}
Expand Down
5 changes: 3 additions & 2 deletions IdentityServer/v7/docs/content/ui/login/dynamicproviders.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ For example:
```cs
class CustomOidcConfigureOptions : ConfigureAuthenticationOptions<OpenIdConnectOptions, OidcProvider>
{
public CustomOidcConfigureOptions(IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor)
public CustomOidcConfigureOptions(IHttpContextAccessor httpContextAccessor,
ILogger<CustomOidcConfigureOptions> logger) : base(httpContextAccessor, logger)
{
}

Expand All @@ -131,7 +132,7 @@ class CustomOidcConfigureOptions : ConfigureAuthenticationOptions<OpenIdConnectO
The above class would need to be configured in DI (as before):

```cs
public void Configure(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.ConfigureOptions<CustomOidcConfigureOptions>();
}
Expand Down

0 comments on commit 62079b9

Please sign in to comment.