Skip to content

Commit

Permalink
log form post authenticate parameter value to fix unused parameter error
Browse files Browse the repository at this point in the history
  • Loading branch information
dncsvr committed May 14, 2024
1 parent 0e694ec commit 45076c6
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
using System.Security.Claims;
using Microsoft.Extensions.Logging;
using System.Security.Claims;

namespace Do.Test.Authentication;

public class AuthenticationSamples(Func<ClaimsPrincipal> _getClaims)
public class AuthenticationSamples(
Func<ClaimsPrincipal> _getClaims,
ILogger<AuthenticationSamples> _logger
)
{
public string? Authenticate() =>
_getClaims().Identity?.AuthenticationType;

public string? FormPostAuthenticate(object value) =>
_getClaims().Identity?.AuthenticationType;
public string? FormPostAuthenticate(object value)
{
_logger.LogInformation($"Form post authenticate is called with value:'{value}'");

return _getClaims().Identity?.AuthenticationType;
}
}

0 comments on commit 45076c6

Please sign in to comment.