Compare commits
3 Commits
6a151394a7
...
4daf986f3e
| Author | SHA1 | Date | |
|---|---|---|---|
| 4daf986f3e | |||
| cc7f55c988 | |||
| 11a2f9818a |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -400,6 +400,7 @@ FodyWeavers.xsd
|
|||||||
# Style builds
|
# Style builds
|
||||||
**/style.min.css
|
**/style.min.css
|
||||||
**/package-lock.json
|
**/package-lock.json
|
||||||
|
**/bun.lock
|
||||||
|
|
||||||
# Secrets
|
# Secrets
|
||||||
**/.env
|
**/.env
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ public class OidcOptions
|
|||||||
{
|
{
|
||||||
public string Authority { get; set; }
|
public string Authority { get; set; }
|
||||||
public bool RequireHttpsMetadata { get; set; } = true;
|
public bool RequireHttpsMetadata { get; set; } = true;
|
||||||
|
public bool DisableHttpsOnlyCookies { get; set; }
|
||||||
public string ResponseType { get; set; } = "code";
|
public string ResponseType { get; set; } = "code";
|
||||||
public string[]? Scopes { get; set; }
|
public string[]? Scopes { get; set; }
|
||||||
public string ClientId { get; set; }
|
public string ClientId { get; set; }
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ public class SetupController : Controller
|
|||||||
|
|
||||||
Permissions.System.Info,
|
Permissions.System.Info,
|
||||||
Permissions.System.Diagnose,
|
Permissions.System.Diagnose,
|
||||||
|
Permissions.System.Versions,
|
||||||
|
Permissions.System.Instance,
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,12 @@ public partial class Startup
|
|||||||
options.Authority = oidcOptions.Authority;
|
options.Authority = oidcOptions.Authority;
|
||||||
options.RequireHttpsMetadata = oidcOptions.RequireHttpsMetadata;
|
options.RequireHttpsMetadata = oidcOptions.RequireHttpsMetadata;
|
||||||
|
|
||||||
|
if (oidcOptions.DisableHttpsOnlyCookies)
|
||||||
|
{
|
||||||
|
options.NonceCookie.SecurePolicy = CookieSecurePolicy.SameAsRequest;
|
||||||
|
options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.SameAsRequest;
|
||||||
|
}
|
||||||
|
|
||||||
var scopes = oidcOptions.Scopes ?? ["openid", "email", "profile"];
|
var scopes = oidcOptions.Scopes ?? ["openid", "email", "profile"];
|
||||||
|
|
||||||
options.Scope.Clear();
|
options.Scope.Clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user