-
Notifications
You must be signed in to change notification settings - Fork 12
Common claims
Hugo Biarge edited this page Feb 3, 2019
·
5 revisions
In the TestServerOptions you can configure a collection of common claims that will be included in the ClaimsPrincipal instance in addition to the received claims.
services.AddAuthentication(TestServerAuthenticationDefaults.AuthenticationScheme)
.AddTestServer(options =>
{
options.CommonClaims = new[]
{
new Claim(ClaimTypes.AuthenticationInstant, Iso8601UtcNow()),
};
});