-
Notifications
You must be signed in to change notification settings - Fork 9.8k
/
ClaimsIdentityOptions.cs
37 lines (30 loc) · 1.43 KB
/
ClaimsIdentityOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Security.Claims;
namespace Microsoft.AspNetCore.Identity;
/// <summary>
/// Options used to configure the claim types used for well known claims.
/// </summary>
public class ClaimsIdentityOptions
{
/// <summary>
/// Gets or sets the ClaimType used for a Role claim. Defaults to <see cref="ClaimTypes.Role"/>.
/// </summary>
public string RoleClaimType { get; set; } = ClaimTypes.Role;
/// <summary>
/// Gets or sets the ClaimType used for the user name claim. Defaults to <see cref="ClaimTypes.Name"/>.
/// </summary>
public string UserNameClaimType { get; set; } = ClaimTypes.Name;
/// <summary>
/// Gets or sets the ClaimType used for the user identifier claim. Defaults to <see cref="ClaimTypes.NameIdentifier"/>.
/// </summary>
public string UserIdClaimType { get; set; } = ClaimTypes.NameIdentifier;
/// <summary>
/// Gets or sets the ClaimType used for the user email claim. Defaults to <see cref="ClaimTypes.Email"/>.
/// </summary>
public string EmailClaimType { get; set; } = ClaimTypes.Email;
/// <summary>
/// Gets or sets the ClaimType used for the security stamp claim. Defaults to "AspNet.Identity.SecurityStamp".
/// </summary>
public string SecurityStampClaimType { get; set; } = "AspNet.Identity.SecurityStamp";
}