< Summary

Information
Class: ProjectTemplate.Web.Authentication.Options.ApplicationAuthorizationOptions
Assembly: ProjectTemplate.Web
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Options/ApplicationAuthorizationOptions.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 32
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_RoleClaimType()100%11100%
get_PermissionClaimType()100%11100%
get_AdministratorRoles()100%11100%
get_ManageApplicationPermissions()100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Options/ApplicationAuthorizationOptions.cs

#LineLine coverage
 1namespace ProjectTemplate.Web.Authentication.Options;
 2
 3/// <summary>
 4/// Provides configurable authorization policy options for the application.
 5/// </summary>
 6public sealed class ApplicationAuthorizationOptions
 7{
 8    /// <summary>
 9    /// Gets the configuration section name used to bind application authorization settings.
 10    /// </summary>
 11    public const string SectionName = "ProjectTemplate:Authorization";
 12
 13    /// <summary>
 14    /// Gets or sets the claim type used to evaluate role-based authorization policies.
 15    /// </summary>
 98416    public string RoleClaimType { get; set; } = "application:role";
 17
 18    /// <summary>
 19    /// Gets or sets the claim type used to evaluate permission-based authorization policies.
 20    /// </summary>
 98421    public string PermissionClaimType { get; set; } = "application:permission";
 22
 23    /// <summary>
 24    /// Gets or sets the role values that satisfy the administrator authorization policy.
 25    /// </summary>
 109626    public string[] AdministratorRoles { get; set; } = ["administrator"];
 27
 28    /// <summary>
 29    /// Gets or sets the permission values that satisfy the manage application authorization policy.
 30    /// </summary>
 109631    public string[] ManageApplicationPermissions { get; set; } = ["application.manage"];
 32}