< Summary - Heimdall API

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ScopeId()100%11100%
get_IdToken()100%11100%
get_Nonce()100%11100%

File(s)

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

#LineLine coverage
 1using ArturRios.Mediator.Command;
 2
 3namespace ArturRios.Heimdall.Command.Input;
 4
 5/// <summary>
 6///     Intent to authenticate a Google account against a scope (UC-25, FR-GO-03…FR-GO-11) — signing
 7///     the account up on its first use and signing it in on every later one. Distinct from
 8///     <see cref="SetGoogleSignInCommand" />, which is UC-24's toggle for whether a scope allows this
 9///     at all.
 10/// </summary>
 11/// <remarks>
 12///     Carries no acting person: the endpoint is anonymous, and the only identity involved is the one
 13///     the Google ID token asserts. No validator either — UC-25 defines no <c>400</c> flow and needs
 14///     none, since an absent token fails verification (AF-25a, 401) and an empty scope identifier
 15///     matches no scope (AF-25b, 403). Both are outcomes the use case already names.
 16/// </remarks>
 17public class GoogleSignInCommand : BaseCommand
 18{
 19    /// <summary>Public identifier of the scope the account is signing in to (FR-GO-06).</summary>
 18620    public Guid ScopeId { get; set; }
 21
 22    /// <summary>The Google ID token the caller obtained from Google, verified before it is trusted.</summary>
 29423    public string IdToken { get; set; } = string.Empty;
 24
 25    /// <summary>
 26    ///     Optional: the nonce the client sent Google when it asked for <see cref="IdToken" />. When
 27    ///     present, the token's <c>nonce</c> claim must equal it exactly (FR-GO-20), which binds the
 28    ///     token to the client's own sign-in attempt: a client can refuse a token that was not issued
 29    ///     for its request. Absent or empty, nothing is compared. Whether a token is accepted rests on
 30    ///     its signature, issuer, audience and expiry.
 31    /// </summary>
 16932    public string? Nonce { get; set; }
 33}