1 // Copyright (c) .NET Foundation. All rights reserved.
2 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 
4 using System.Security.Claims;
5 
6 namespace Microsoft.AspNetCore.Identity
7 {
8     /// <summary>
9     /// Options used to configure the claim types used for well known claims.
10     /// </summary>
11     public class ClaimsIdentityOptions
12     {
13         /// <summary>
14         /// Gets or sets the ClaimType used for a Role claim. Defaults to <see cref="ClaimTypes.Role"/>.
15         /// </summary>
16         public string RoleClaimType { get; set; } = ClaimTypes.Role;
17 
18         /// <summary>
19         /// Gets or sets the ClaimType used for the user name claim. Defaults to <see cref="ClaimTypes.Name"/>.
20         /// </summary>
21         public string UserNameClaimType { get; set; } = ClaimTypes.Name;
22 
23         /// <summary>
24         /// Gets or sets the ClaimType used for the user identifier claim. Defaults to <see cref="ClaimTypes.NameIdentifier"/>.
25         /// </summary>
26         public string UserIdClaimType { get; set; } = ClaimTypes.NameIdentifier;
27 
28         /// <summary>
29         /// Gets or sets the ClaimType used for the security stamp claim. Defaults to "AspNet.Identity.SecurityStamp".
30         /// </summary>
31         public string SecurityStampClaimType { get; set; } = "AspNet.Identity.SecurityStamp";
32     }
33 }