Skip to content

Common claims

Hugo Biarge edited this page Dec 3, 2017 · 5 revisions

Common Claims

You can configure common claims that will be issued to the ClaimsPrincipal in addition to the received claims.

services.AddAuthentication(TestServerAuthenticationDefaults.AuthenticationScheme)
    .AddTestServerAuthentication(options =>
    {
        options.CommonClaims = new[]
        {
            new Claim(ClaimTypes.AuthenticationInstant, Iso8601UtcNow()),
        };
    });