< 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: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 42
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%

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>
 125411    public bool Enabled { get; set; } = true;
 12
 13    /// <summary>
 14    /// Gets or sets the cookie authentication scheme name.
 15    /// </summary>
 125416    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>
 105221    public string LoginPath { get; set; } = "/Account/Login";
 22
 23    /// <summary>
 24    /// Gets or sets the logout path used by the application.
 25    /// </summary>
 105226    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>
 105231    public string AccessDeniedPath { get; set; } = "/Account/AccessDenied";
 32
 33    /// <summary>
 34    /// Gets or sets the cookie expiration time in minutes.
 35    /// </summary>
 134436    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>
 106841    public bool SlidingExpiration { get; set; } = true;
 42}