< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Query.Output.TwoFactorStatusOutput
Assembly: ArturRios.Heimdall.Query
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Query/Output/TwoFactorStatusOutput.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 28
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_IsActive()100%11100%
get_AppEnabled()100%11100%
get_EmailEnabled()100%11100%
get_RemainingRecoveryCodes()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Query/Output/TwoFactorStatusOutput.cs

#LineLine coverage
 1using ArturRios.Mediator.Query;
 2
 3namespace ArturRios.Heimdall.Query.Output;
 4
 5/// <summary>
 6///     The caller's own two-factor authentication state (FR-2F-15). Carries no secret: never the
 7///     TOTP secret, never a recovery code, only how many recovery codes remain unspent.
 8/// </summary>
 9/// <remarks>
 10///     A setup initiated by UC-36 but not yet confirmed by UC-37 needs no field of its own — it is
 11///     exactly <c>!IsActive &amp;&amp; (AppEnabled || EmailEnabled)</c>, since a configuration row
 12///     only ever exists because setup was initiated. A caller who never initiated setup gets every
 13///     flag <c>false</c> and <see cref="RemainingRecoveryCodes" /> zero.
 14/// </remarks>
 15public class TwoFactorStatusOutput : QueryOutput
 16{
 17    /// <summary>Whether two-factor authentication is confirmed and in force (FR-2F-04).</summary>
 1718    public bool IsActive { get; set; }
 19
 20    /// <summary>Whether the authenticator-app method is configured (FR-2F-02).</summary>
 1721    public bool AppEnabled { get; set; }
 22
 23    /// <summary>Whether the email method is configured (FR-2F-03).</summary>
 1624    public bool EmailEnabled { get; set; }
 25
 26    /// <summary>How many issued recovery codes remain unused (FR-2F-05, FR-2F-06).</summary>
 1527    public int RemainingRecoveryCodes { get; set; }
 28}