< Summary

Information
Class: ProjectTemplate.Web.Authentication.Options.ApplicationCookieAuthenticationOptions
Assembly: ProjectTemplate.Web
File(s): /home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Options/ApplicationCookieAuthenticationOptions.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 51
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Enabled()100%11100%
get_Scheme()100%11100%
get_LoginPath()100%11100%
get_LogoutPath()100%11100%
get_AccessDeniedPath()100%11100%
get_ExpireMinutes()100%11100%
get_SlidingExpiration()100%11100%
get_AllowInsecureHttp()100%11100%

File(s)

/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/src/ProjectTemplate.Web/Authentication/Options/ApplicationCookieAuthenticationOptions.cs

#LineLine coverage
 1namespace ProjectTemplate.Web.Authentication.Options;
 2
 3/// <summary>
 4/// Represents cookie authentication configuration.
 5/// </summary>
 6public sealed class ApplicationCookieAuthenticationOptions
 7{
 8    /// <summary>
 9    /// Gets or sets a value indicating whether cookie authentication is enabled.
 10    /// </summary>
 136411    public bool Enabled { get; set; } = true;
 12
 13    /// <summary>
 14    /// Gets or sets the cookie authentication scheme name.
 15    /// </summary>
 136416    public string Scheme { get; set; } = "Cookies";
 17
 18    /// <summary>
 19    /// Gets or sets the login path used when an unauthenticated request requires authentication.
 20    /// </summary>
 115621    public string LoginPath { get; set; } = "/Account/Login";
 22
 23    /// <summary>
 24    /// Gets or sets the logout path used by the application.
 25    /// </summary>
 115626    public string LogoutPath { get; set; } = "/Account/Logout";
 27
 28    /// <summary>
 29    /// Gets or sets the access denied path used when an authenticated user lacks permission.
 30    /// </summary>
 115631    public string AccessDeniedPath { get; set; } = "/Account/AccessDenied";
 32
 33    /// <summary>
 34    /// Gets or sets the cookie expiration time in minutes.
 35    /// </summary>
 146636    public int ExpireMinutes { get; set; } = 60;
 37
 38    /// <summary>
 39    /// Gets or sets a value indicating whether the cookie expiration should be renewed during active use.
 40    /// </summary>
 117241    public bool SlidingExpiration { get; set; } = true;
 42
 43    /// <summary>
 44    /// Gets or sets a value indicating whether local Development environments may issue the authentication cookie for
 45    /// plain HTTP requests.
 46    /// </summary>
 47    /// <remarks>
 48    /// The default is <see langword="false" />. This override is rejected outside the Development environment.
 49    /// </remarks>
 142850    public bool AllowInsecureHttp { get; set; }
 51}