mirror of
https://github.com/greenpau/caddy-security.git
synced 2025-04-18 08:04:02 +03:00
feature: enable additional scopes (#112)
Co-authored-by: Sergiu Cozma <sergiucozma1994@gmail.com> Co-authored-by: Daniel Branco and Sergiu Cozma <daniel.branco@vw-dilab.com> Co-authored-by: Sergiu Cozma <sergiucozma1994@gmail.com> Co-authored-by: Paul Greenberg <greenpau@users.noreply.github.com>
This commit is contained in:
parent
ecffdc9195
commit
c741828ab7
@ -33,6 +33,8 @@ func parseCaddyfileAuthorizationMisc(h *caddyfile.Dispenser, repl *caddy.Replace
|
||||
p.RedirectWithJavascript = true
|
||||
case v == "strip token":
|
||||
p.StripTokenEnabled = true
|
||||
case v == "additional scopes":
|
||||
p.AdditionalScopes = true
|
||||
case strings.HasPrefix(v, "login hint"):
|
||||
remainingArguments := strings.TrimPrefix(v, "login hint ")
|
||||
switch {
|
||||
|
@ -166,6 +166,7 @@ func TestParseCaddyfileAuthorization(t *testing.T) {
|
||||
enable js redirect
|
||||
set auth url /auth
|
||||
enable strip token
|
||||
enable additional scopes
|
||||
acl rule {
|
||||
comment allow users
|
||||
match role authp/user
|
||||
@ -215,6 +216,7 @@ func TestParseCaddyfileAuthorization(t *testing.T) {
|
||||
}
|
||||
],
|
||||
"strip_token_enabled": true,
|
||||
"additional_scopes": true,
|
||||
"user_identity_field": "id",
|
||||
"pass_claims_with_headers": true,
|
||||
"redirect_with_javascript": true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user