| | | 1 | | namespace ProjectTemplate.Web.Authentication.Claims; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents source claim mappings used to normalize provider-specific claims. |
| | | 5 | | /// </summary> |
| | | 6 | | public sealed class ApplicationClaimMappingOptions |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Gets or sets the collection of claim type identifiers used to represent the subject in security tokens. |
| | | 10 | | /// </summary> |
| | | 11 | | /// <remarks>This collection typically includes standard claim types such as 'sub', 'subject', 'nameid', |
| | | 12 | | /// and the value of ClaimTypes.NameIdentifier. The identifiers are used to extract or assign the subject value when |
| | | 13 | | /// processing security tokens.</remarks> |
| | 28 | 14 | | public ICollection<string> Subject { get; set; } = |
| | 504 | 15 | | [ |
| | 504 | 16 | | "sub", |
| | 504 | 17 | | "subject", |
| | 504 | 18 | | "nameid", |
| | 504 | 19 | | System.Security.Claims.ClaimTypes.NameIdentifier |
| | 504 | 20 | | ]; |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Gets or sets the collection of claim type names used to identify a user's name. |
| | | 24 | | /// </summary> |
| | | 25 | | /// <remarks>This collection typically includes standard claim type identifiers such as "name", |
| | | 26 | | /// "display_name", and values from <see cref="System.Security.Claims.ClaimTypes"/>. The collection can be |
| | | 27 | | /// customized to support additional or alternative claim type names as needed.</remarks> |
| | 28 | 28 | | public ICollection<string> Name { get; set; } = |
| | 504 | 29 | | [ |
| | 504 | 30 | | "name", |
| | 504 | 31 | | "display_name", |
| | 504 | 32 | | System.Security.Claims.ClaimTypes.Name |
| | 504 | 33 | | ]; |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Gets or sets the collection of claim type identifiers used to represent an email address. |
| | | 37 | | /// </summary> |
| | | 38 | | /// <remarks>This collection typically includes standard claim type names such as "email", "emailaddress", |
| | | 39 | | /// and the value of <see cref="System.Security.Claims.ClaimTypes.Email"/>. Modify this collection to support custom |
| | | 40 | | /// or additional claim type identifiers as needed.</remarks> |
| | 28 | 41 | | public ICollection<string> Email { get; set; } = |
| | 504 | 42 | | [ |
| | 504 | 43 | | "email", |
| | 504 | 44 | | "emailaddress", |
| | 504 | 45 | | System.Security.Claims.ClaimTypes.Email |
| | 504 | 46 | | ]; |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Gets or sets the collection of claim type names that represent user roles. |
| | | 50 | | /// </summary> |
| | | 51 | | /// <remarks>This collection typically includes standard claim type names such as "role", "roles", and the |
| | | 52 | | /// value of <see cref="System.Security.Claims.ClaimTypes.Role"/>. Modify this collection to support custom or |
| | | 53 | | /// additional role claim types as needed.</remarks> |
| | 28 | 54 | | public ICollection<string> Role { get; set; } = |
| | 504 | 55 | | [ |
| | 504 | 56 | | "role", |
| | 504 | 57 | | "roles", |
| | 504 | 58 | | System.Security.Claims.ClaimTypes.Role |
| | 504 | 59 | | ]; |
| | | 60 | | |
| | | 61 | | /// <summary> |
| | | 62 | | /// Gets or sets the collection of group identifiers associated with the entity. |
| | | 63 | | /// </summary> |
| | 28 | 64 | | public ICollection<string> Group { get; set; } = |
| | 504 | 65 | | [ |
| | 504 | 66 | | "group", |
| | 504 | 67 | | "groups", |
| | 504 | 68 | | "memberOf" |
| | 504 | 69 | | ]; |
| | | 70 | | |
| | | 71 | | /// <summary> |
| | | 72 | | /// Gets or sets the collection of permission identifiers associated with the current context. |
| | | 73 | | /// </summary> |
| | 28 | 74 | | public ICollection<string> Permission { get; set; } = |
| | 504 | 75 | | [ |
| | 504 | 76 | | "permission", |
| | 504 | 77 | | "permissions", |
| | 504 | 78 | | "scope", |
| | 504 | 79 | | "scp" |
| | 504 | 80 | | ]; |
| | | 81 | | } |