< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/EnableTwoFactorAuthCommand.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 31
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_Methods()100%11100%
get_CurrentPassword()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/EnableTwoFactorAuthCommand.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 begin opting the caller into two-factor authentication (UC-36, FR-2F-01),
 9///     selecting an authenticator-app method, an email method, or both. <see cref="ActingPersonId" />
 10///     /<see cref="ActingRole" /> are set by the controller from the authenticated caller and are
 11///     never bound from the body — like <see cref="ResendVerificationEmailCommand" />, a caller can
 12///     only ever act on their own configuration. They are <c>[JsonIgnore]</c>, so they are not
 13///     deserialized from the body and do not appear in the request schema.
 14/// </summary>
 15public class EnableTwoFactorAuthCommand : BaseCommand, IActorScoped
 16{
 17    /// <summary>The method(s) to configure: <c>"App"</c>, <c>"Email"</c>, or both. Required, non-empty.</summary>
 33518    public List<string> Methods { get; set; } = [];
 19
 20    /// <summary>
 21    ///     The caller's current password (FR-2F-18). Required: adding a second factor requires proof of
 22    ///     identity, as removing one does, and a bearer token alone is not that proof.
 23    /// </summary>
 19124    public string? CurrentPassword { get; set; }
 25
 26    [JsonIgnore]
 9927    public Guid ActingPersonId { get; set; }
 28
 29    [JsonIgnore]
 5130    public int ActingRole { get; set; }
 31}