forked from Github-Mirrors/canaille
tests: use canaille.test domain instead of localhost
This commit is contained in:
parent
c563646bfe
commit
a3908883e3
3 changed files with 16 additions and 15 deletions
|
@ -60,6 +60,7 @@ def configuration(smtpd):
|
||||||
smtpd.config.use_starttls = True
|
smtpd.config.use_starttls = True
|
||||||
conf = {
|
conf = {
|
||||||
"SECRET_KEY": gen_salt(24),
|
"SECRET_KEY": gen_salt(24),
|
||||||
|
"SERVER_NAME": "canaille.test",
|
||||||
"JAVASCRIPT": False,
|
"JAVASCRIPT": False,
|
||||||
"LOGO": "/static/img/canaille-head.webp",
|
"LOGO": "/static/img/canaille-head.webp",
|
||||||
"TIMEZONE": "UTC",
|
"TIMEZONE": "UTC",
|
||||||
|
|
|
@ -26,7 +26,7 @@ def test_get(testclient, backend, client, user):
|
||||||
"https://mydomain.tld/redirect2",
|
"https://mydomain.tld/redirect2",
|
||||||
],
|
],
|
||||||
"registration_access_token": "static-token",
|
"registration_access_token": "static-token",
|
||||||
"registration_client_uri": f"http://localhost/oauth/register/{client.client_id}",
|
"registration_client_uri": f"http://canaille.test/oauth/register/{client.client_id}",
|
||||||
"token_endpoint_auth_method": "client_secret_basic",
|
"token_endpoint_auth_method": "client_secret_basic",
|
||||||
"grant_types": [
|
"grant_types": [
|
||||||
"password",
|
"password",
|
||||||
|
@ -104,7 +104,7 @@ def test_update(testclient, backend, client, user):
|
||||||
"client_secret_expires_at": 0,
|
"client_secret_expires_at": 0,
|
||||||
"redirect_uris": ["https://newname.example.org/callback"],
|
"redirect_uris": ["https://newname.example.org/callback"],
|
||||||
"registration_access_token": "static-token",
|
"registration_access_token": "static-token",
|
||||||
"registration_client_uri": f"http://localhost/oauth/register/{client.client_id}",
|
"registration_client_uri": f"http://canaille.test/oauth/register/{client.client_id}",
|
||||||
"token_endpoint_auth_method": "none",
|
"token_endpoint_auth_method": "none",
|
||||||
"grant_types": ["refresh_token"],
|
"grant_types": ["refresh_token"],
|
||||||
"response_types": ["code", "token"],
|
"response_types": ["code", "token"],
|
||||||
|
|
|
@ -5,12 +5,12 @@ def test_oauth_authorization_server(testclient):
|
||||||
res = testclient.get("/.well-known/oauth-authorization-server", status=200).json
|
res = testclient.get("/.well-known/oauth-authorization-server", status=200).json
|
||||||
assert "https://auth.mydomain.tld" == res["issuer"]
|
assert "https://auth.mydomain.tld" == res["issuer"]
|
||||||
assert res == {
|
assert res == {
|
||||||
"authorization_endpoint": "http://localhost/oauth/authorize",
|
"authorization_endpoint": "http://canaille.test/oauth/authorize",
|
||||||
"code_challenge_methods_supported": ["plain", "S256"],
|
"code_challenge_methods_supported": ["plain", "S256"],
|
||||||
"introspection_endpoint": "http://localhost/oauth/introspect",
|
"introspection_endpoint": "http://canaille.test/oauth/introspect",
|
||||||
"issuer": "https://auth.mydomain.tld",
|
"issuer": "https://auth.mydomain.tld",
|
||||||
"jwks_uri": "http://localhost/oauth/jwks.json",
|
"jwks_uri": "http://canaille.test/oauth/jwks.json",
|
||||||
"registration_endpoint": "http://localhost/oauth/register",
|
"registration_endpoint": "http://canaille.test/oauth/register",
|
||||||
"response_types_supported": [
|
"response_types_supported": [
|
||||||
"code",
|
"code",
|
||||||
"token",
|
"token",
|
||||||
|
@ -27,7 +27,7 @@ def test_oauth_authorization_server(testclient):
|
||||||
"phone",
|
"phone",
|
||||||
"groups",
|
"groups",
|
||||||
],
|
],
|
||||||
"token_endpoint": "http://localhost/oauth/token",
|
"token_endpoint": "http://canaille.test/oauth/token",
|
||||||
"token_endpoint_auth_methods_supported": [
|
"token_endpoint_auth_methods_supported": [
|
||||||
"client_secret_basic",
|
"client_secret_basic",
|
||||||
"private_key_jwt",
|
"private_key_jwt",
|
||||||
|
@ -36,7 +36,7 @@ def test_oauth_authorization_server(testclient):
|
||||||
],
|
],
|
||||||
"token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"],
|
"token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"],
|
||||||
"ui_locales_supported": g.available_language_codes,
|
"ui_locales_supported": g.available_language_codes,
|
||||||
"userinfo_endpoint": "http://localhost/oauth/userinfo",
|
"userinfo_endpoint": "http://canaille.test/oauth/userinfo",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ def test_openid_configuration(testclient):
|
||||||
res = testclient.get("/.well-known/openid-configuration", status=200).json
|
res = testclient.get("/.well-known/openid-configuration", status=200).json
|
||||||
assert "https://auth.mydomain.tld" == res["issuer"]
|
assert "https://auth.mydomain.tld" == res["issuer"]
|
||||||
assert res == {
|
assert res == {
|
||||||
"authorization_endpoint": "http://localhost/oauth/authorize",
|
"authorization_endpoint": "http://canaille.test/oauth/authorize",
|
||||||
"claims_supported": [
|
"claims_supported": [
|
||||||
"sub",
|
"sub",
|
||||||
"iss",
|
"iss",
|
||||||
|
@ -65,12 +65,12 @@ def test_openid_configuration(testclient):
|
||||||
"nonce",
|
"nonce",
|
||||||
],
|
],
|
||||||
"code_challenge_methods_supported": ["plain", "S256"],
|
"code_challenge_methods_supported": ["plain", "S256"],
|
||||||
"end_session_endpoint": "http://localhost/oauth/end_session",
|
"end_session_endpoint": "http://canaille.test/oauth/end_session",
|
||||||
"id_token_signing_alg_values_supported": ["RS256", "ES256", "HS256"],
|
"id_token_signing_alg_values_supported": ["RS256", "ES256", "HS256"],
|
||||||
"introspection_endpoint": "http://localhost/oauth/introspect",
|
"introspection_endpoint": "http://canaille.test/oauth/introspect",
|
||||||
"issuer": "https://auth.mydomain.tld",
|
"issuer": "https://auth.mydomain.tld",
|
||||||
"jwks_uri": "http://localhost/oauth/jwks.json",
|
"jwks_uri": "http://canaille.test/oauth/jwks.json",
|
||||||
"registration_endpoint": "http://localhost/oauth/register",
|
"registration_endpoint": "http://canaille.test/oauth/register",
|
||||||
"response_types_supported": [
|
"response_types_supported": [
|
||||||
"code",
|
"code",
|
||||||
"token",
|
"token",
|
||||||
|
@ -88,7 +88,7 @@ def test_openid_configuration(testclient):
|
||||||
"groups",
|
"groups",
|
||||||
],
|
],
|
||||||
"subject_types_supported": ["pairwise", "public"],
|
"subject_types_supported": ["pairwise", "public"],
|
||||||
"token_endpoint": "http://localhost/oauth/token",
|
"token_endpoint": "http://canaille.test/oauth/token",
|
||||||
"token_endpoint_auth_methods_supported": [
|
"token_endpoint_auth_methods_supported": [
|
||||||
"client_secret_basic",
|
"client_secret_basic",
|
||||||
"private_key_jwt",
|
"private_key_jwt",
|
||||||
|
@ -97,5 +97,5 @@ def test_openid_configuration(testclient):
|
||||||
],
|
],
|
||||||
"token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"],
|
"token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"],
|
||||||
"ui_locales_supported": g.available_language_codes,
|
"ui_locales_supported": g.available_language_codes,
|
||||||
"userinfo_endpoint": "http://localhost/oauth/userinfo",
|
"userinfo_endpoint": "http://canaille.test/oauth/userinfo",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue