| | | 1 | | namespace ProjectTemplate.Web.Authentication.Options; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents cookie authentication configuration. |
| | | 5 | | /// </summary> |
| | | 6 | | public sealed class ApplicationCookieAuthenticationOptions |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Gets or sets a value indicating whether cookie authentication is enabled. |
| | | 10 | | /// </summary> |
| | 1254 | 11 | | public bool Enabled { get; set; } = true; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Gets or sets the cookie authentication scheme name. |
| | | 15 | | /// </summary> |
| | 1254 | 16 | | 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> |
| | 1052 | 21 | | public string LoginPath { get; set; } = "/Account/Login"; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Gets or sets the logout path used by the application. |
| | | 25 | | /// </summary> |
| | 1052 | 26 | | 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> |
| | 1052 | 31 | | public string AccessDeniedPath { get; set; } = "/Account/AccessDenied"; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets or sets the cookie expiration time in minutes. |
| | | 35 | | /// </summary> |
| | 1344 | 36 | | 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> |
| | 1068 | 41 | | public bool SlidingExpiration { get; set; } = true; |
| | | 42 | | } |