| | | 1 | | namespace ProjectTemplate.Web.Authentication.Providers.OpenIdConnect; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents OpenID Connect authentication provider configuration. |
| | | 5 | | /// </summary> |
| | | 6 | | public sealed class OpenIdConnectAuthenticationOptions |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Gets or sets a value indicating whether OpenID Connect authentication is enabled. |
| | | 10 | | /// </summary> |
| | 912 | 11 | | public bool Enabled { get; set; } |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Gets or sets the OpenID Connect authentication scheme. |
| | | 15 | | /// </summary> |
| | 940 | 16 | | public string Scheme { get; set; } = "OpenIdConnect"; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Gets or sets the display name shown for the OpenID Connect provider. |
| | | 20 | | /// </summary> |
| | 944 | 21 | | public string DisplayName { get; set; } = "OpenID Connect"; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Gets or sets the OpenID Connect authority URL. |
| | | 25 | | /// </summary> |
| | 940 | 26 | | public string Authority { get; set; } = string.Empty; |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Gets or sets the OpenID Connect client ID. |
| | | 30 | | /// </summary> |
| | 940 | 31 | | public string ClientId { get; set; } = string.Empty; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets or sets the OpenID Connect client secret. |
| | | 35 | | /// </summary> |
| | 930 | 36 | | public string ClientSecret { get; set; } = string.Empty; |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// Gets or sets the callback path used by the OpenID Connect handler. |
| | | 40 | | /// </summary> |
| | 940 | 41 | | public string CallbackPath { get; set; } = "/signin-oidc"; |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Gets or sets the OpenID Connect response type. |
| | | 45 | | /// </summary> |
| | 940 | 46 | | public string ResponseType { get; set; } = "code"; |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Gets or sets a value indicating whether tokens should be saved after authentication. |
| | | 50 | | /// </summary> |
| | 938 | 51 | | public bool SaveTokens { get; set; } = true; |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Gets or sets the requested OpenID Connect scopes. |
| | | 55 | | /// </summary> |
| | 874 | 56 | | public string[] Scopes { get; set; } = |
| | 492 | 57 | | [ |
| | 492 | 58 | | "openid", |
| | 492 | 59 | | "profile", |
| | 492 | 60 | | "email" |
| | 492 | 61 | | ]; |
| | | 62 | | } |