< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.RequestErasureCommand
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/RequestErasureCommand.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
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: 4
Fully covered methods: 4
Total methods: 4
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Password()100%11100%
get_IdToken()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/RequestErasureCommand.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///     A data subject's request to have their own identity erased (UC-42, GDPR Art. 17, LGPD Art. 18
 9///     VI). The subject is always the authenticated caller — there is no identifier in the path or
 10///     the body — so one identity can never request another's erasure.
 11/// </summary>
 12/// <remarks>
 13///     <para>
 14///         Exactly one of the two credentials is used, and which one is not the caller's choice: a
 15///         person authenticates with their password, a Google User with a fresh Google ID token,
 16///         because a Google User has no password to present. The handler picks by identity type.
 17///     </para>
 18///     <para>
 19///         <see cref="ActingPersonId" /> and <see cref="ActingRole" /> are set by the controller from
 20///         the authenticated caller and never taken from the request; both are <c>[JsonIgnore]</c>,
 21///         which <c>ServerPopulatedBindingMetadataProvider</c> turns into "not bindable", so they
 22///         never reach the public contract.
 23///     </para>
 24/// </remarks>
 25public class RequestErasureCommand : BaseCommand, IActorScoped
 26{
 27    /// <summary>The caller's current password, when the caller is a person.</summary>
 8728    public string? Password { get; set; }
 29
 30    /// <summary>A freshly issued Google ID token, when the caller is a Google User.</summary>
 4031    public string? IdToken { get; set; }
 32
 33    [JsonIgnore]
 7734    public Guid ActingPersonId { get; set; }
 35
 36    [JsonIgnore]
 3937    public int ActingRole { get; set; }
 38}