< Summary - Heimdall API

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
New()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Services/SingleUseToken.cs

#LineLine coverage
 1using ArturRios.Util.Random;
 2
 3namespace ArturRios.Heimdall.Command.Services;
 4
 5/// <summary>
 6///     A fresh single-use token: 48 letters and digits from a CSPRNG, URL-safe — the same shape
 7///     <see cref="EmailVerificationService" /> and <see cref="PasswordResetService" /> issue. Stored only
 8///     through <see cref="SingleUseTokenHash" />.
 9/// </summary>
 10public static class SingleUseToken
 11{
 7612    public static string New() => CustomRandom.Text(new RandomStringOptions
 7613    {
 7614        Length = 48,
 7615        IncludeLowercase = true,
 7616        IncludeUppercase = true,
 7617        IncludeDigits = true,
 7618        IncludeSpecialCharacters = false
 7619    });
 20}

Methods/Properties

New()