mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-09-24 19:00:21 +01:00
@@ -34,6 +34,7 @@ def on_save_security(
|
||||
normalized_values["OIDC_DISCOVERY_URL"] = normalize_http_url(
|
||||
str(discovery_url),
|
||||
default_scheme="https",
|
||||
strip_trailing_slash=False,
|
||||
)
|
||||
|
||||
proxy_logout_url = normalized_values.get("PROXY_AUTH_LOGOUT_URL")
|
||||
|
||||
@@ -435,7 +435,9 @@ class TestSecurityOnSave:
|
||||
|
||||
assert result["error"] is False
|
||||
|
||||
def test_on_save_normalizes_oidc_discovery_url(self, tmp_path, monkeypatch):
|
||||
def test_on_save_normalizes_oidc_discovery_url_without_stripping_trailing_slash(
|
||||
self, tmp_path, monkeypatch
|
||||
):
|
||||
from shelfmark.config.security import _on_save_security
|
||||
|
||||
monkeypatch.setenv("CONFIG_DIR", str(tmp_path))
|
||||
@@ -446,7 +448,7 @@ class TestSecurityOnSave:
|
||||
assert result["error"] is False
|
||||
assert (
|
||||
result["values"]["OIDC_DISCOVERY_URL"]
|
||||
== "https://auth.example.com/.well-known/openid-configuration"
|
||||
== "https://auth.example.com/.well-known/openid-configuration/"
|
||||
)
|
||||
|
||||
def test_on_save_normalizes_proxy_logout_url(self, tmp_path, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user