< Summary

Information
Class: ProjectTemplate.Web.Authentication.Claims.ApplicationClaimMappingOptions
Assembly: ProjectTemplate.Web
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Claims/ApplicationClaimMappingOptions.cs
Line coverage
100%
Covered lines: 38
Uncovered lines: 0
Coverable lines: 38
Total lines: 81
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Subject()100%11100%
.ctor()100%11100%
get_Name()100%11100%
get_Email()100%11100%
get_Role()100%11100%
get_Group()100%11100%
get_Permission()100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Claims/ApplicationClaimMappingOptions.cs

#LineLine coverage
 1namespace ProjectTemplate.Web.Authentication.Claims;
 2
 3/// <summary>
 4/// Represents source claim mappings used to normalize provider-specific claims.
 5/// </summary>
 6public 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>
 2814    public ICollection<string> Subject { get; set; } =
 54815    [
 54816        "sub",
 54817        "subject",
 54818        "nameid",
 54819        System.Security.Claims.ClaimTypes.NameIdentifier
 54820    ];
 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>
 2828    public ICollection<string> Name { get; set; } =
 54829    [
 54830        "name",
 54831        "display_name",
 54832        System.Security.Claims.ClaimTypes.Name
 54833    ];
 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>
 2841    public ICollection<string> Email { get; set; } =
 54842    [
 54843        "email",
 54844        "emailaddress",
 54845        System.Security.Claims.ClaimTypes.Email
 54846    ];
 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>
 2854    public ICollection<string> Role { get; set; } =
 54855    [
 54856        "role",
 54857        "roles",
 54858        System.Security.Claims.ClaimTypes.Role
 54859    ];
 60
 61    /// <summary>
 62    /// Gets or sets the collection of group identifiers associated with the entity.
 63    /// </summary>
 2864    public ICollection<string> Group { get; set; } =
 54865    [
 54866        "group",
 54867        "groups",
 54868        "memberOf"
 54869    ];
 70
 71    /// <summary>
 72    /// Gets or sets the collection of permission identifiers associated with the current context.
 73    /// </summary>
 2874    public ICollection<string> Permission { get; set; } =
 54875    [
 54876        "permission",
 54877        "permissions",
 54878        "scope",
 54879        "scp"
 54880    ];
 81}