| | | 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> |
| | 1364 | 11 | | public bool Enabled { get; set; } = true; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Gets or sets the cookie authentication scheme name. |
| | | 15 | | /// </summary> |
| | 1364 | 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> |
| | 1156 | 21 | | public string LoginPath { get; set; } = "/Account/Login"; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Gets or sets the logout path used by the application. |
| | | 25 | | /// </summary> |
| | 1156 | 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> |
| | 1156 | 31 | | public string AccessDeniedPath { get; set; } = "/Account/AccessDenied"; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets or sets the cookie expiration time in minutes. |
| | | 35 | | /// </summary> |
| | 1466 | 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> |
| | 1172 | 41 | | 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> |
| | 1428 | 50 | | public bool AllowInsecureHttp { get; set; } |
| | | 51 | | } |