< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.CreateScopePermissionCommand
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/CreateScopePermissionCommand.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 38
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 6
Fully covered methods: 6
Total methods: 6
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ScopeId()100%11100%
get_Name()100%11100%
get_Description()100%11100%
get_IncludeAsJwtClaim()100%11100%
get_ActingPersonId()100%11100%
get_ActingRole()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/CreateScopePermissionCommand.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using ArturRios.Heimdall.Shared.Security;
 3using ArturRios.Mediator.Command;
 4
 5namespace ArturRios.Heimdall.Command.Input;
 6
 7/// <summary>
 8///     Intent to register a scope-specific permission (UC-31). <see cref="ScopeId" /> comes from the
 9///     route; <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by the controller from
 10///     the authenticated caller (for the AF-31e scope-ownership check) and are never bound from the
 11///     body. They are <c>[JsonIgnore]</c>, so they are not deserialized from the body and do not
 12///     appear in the request schema. The <see cref="IncludeAsJwtClaim" /> flag controls whether the
 13///     permission's <see cref="Name" /> is folded into the JWT issued to identities acting within the
 14///     owning scope.
 15/// </summary>
 16public class CreateScopePermissionCommand : BaseCommand, IActorScoped
 17{
 18    [JsonIgnore]
 6919    public Guid ScopeId { get; set; }
 20
 21    /// <summary>Permission display name. Required, max 200 characters.</summary>
 21722    public string Name { get; set; } = string.Empty;
 23
 24    /// <summary>Optional description of the permission's purpose. Max 500 characters.</summary>
 13225    public string? Description { get; set; }
 26
 27    /// <summary>
 28    ///     When <c>true</c>, this permission's <see cref="Name" /> is added as a claim on the JWT
 29    ///     issued to identities acting within the owning scope. Defaults to <c>false</c>.
 30    /// </summary>
 10031    public bool IncludeAsJwtClaim { get; set; }
 32
 33    [JsonIgnore]
 5934    public Guid ActingPersonId { get; set; }
 35
 36    [JsonIgnore]
 5937    public int ActingRole { get; set; }
 38}