< Summary

Information
Class: ArturRios.Util.WebApi.Security.Configuration.AuthenticationOptions
Assembly: ArturRios.Util.WebApi
File(s): D:\Repositories\dotnet-webapi-util\src\Security\Configuration\AuthenticationOptions.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 25
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 6
Fully covered methods: 6
Total methods: 6
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Source()100%11100%
get_CookieName()100%11100%
get_EnableJwt()100%11100%
get_EnableGoogle()100%11100%
get_JwtMode()100%11100%
get_GoogleClientIds()100%11100%

File(s)

D:\Repositories\dotnet-webapi-util\src\Security\Configuration\AuthenticationOptions.cs

#LineLine coverage
 1using ArturRios.Util.WebApi.Security.Enums;
 2
 3namespace ArturRios.Util.WebApi.Security.Configuration;
 4
 5/// <summary>Consolidated options controlling how <c>AuthenticationMiddleware</c> reads and validates the request token.
 6public class AuthenticationOptions
 7{
 8    /// <summary>Where the token is read from. Defaults to <see cref="TokenSource.Header"/>.</summary>
 249    public TokenSource Source { get; set; } = TokenSource.Header;
 10
 11    /// <summary>The cookie name used when <see cref="Source"/> is <see cref="TokenSource.Cookie"/> or <see cref="TokenS
 2412    public string CookieName { get; set; } = "access_token";
 13
 14    /// <summary>Whether the app's own HMAC JWT is accepted. Defaults to <see langword="true"/>.</summary>
 2515    public bool EnableJwt { get; set; } = true;
 16
 17    /// <summary>Whether Google ID tokens are accepted. Defaults to <see langword="false"/>. Requires <see cref="GoogleC
 1518    public bool EnableGoogle { get; set; }
 19
 20    /// <summary>How the user is resolved for a valid app JWT. Defaults to <see cref="JwtValidationMode.ClaimsOnly"/>.</
 2921    public JwtValidationMode JwtMode { get; set; } = JwtValidationMode.ClaimsOnly;
 22
 23    /// <summary>The accepted Google OAuth client IDs (token audiences). Required when <see cref="EnableGoogle"/> is <se
 3224    public IList<string> GoogleClientIds { get; set; } = new List<string>();
 25}