oidcauthlib 3.0.4__tar.gz → 3.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oidcauthlib-3.0.4/oidcauthlib.egg-info → oidcauthlib-3.0.5}/PKG-INFO +1 -1
- oidcauthlib-3.0.5/VERSION +1 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/dcr_client.py +30 -2
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/dcr_manager.py +65 -3
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5/oidcauthlib.egg-info}/PKG-INFO +1 -1
- oidcauthlib-3.0.4/VERSION +0 -1
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/LICENSE +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/MANIFEST.in +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/Makefile +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/README.md +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/auth_helper.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/auth_manager.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/oauth_cache.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/oauth_memory_cache.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/oauth_mongo_cache.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/config/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/config/auth_config.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/config/auth_config_reader.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/dcr_registration.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_bearer_token_expired_exception.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_bearer_token_invalid_exception.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_bearer_token_missing_exception.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_needed_exception.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/fastapi_auth_manager.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/request_scope_middleware.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/token_reader_middleware.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/auth.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/base_db_model.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/cache_item.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/client_key_set.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/token.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/base_repository.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/memory/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/memory/memory_repository.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/mongo/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/mongo/mongo_repository.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/repository_factory.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/routers/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/routers/auth_router.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/token_reader.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/auth_server_metadata.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/auth_server_metadata_discovery.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/well_known_configuration_cache.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/well_known_configuration_cache_result.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/well_known_configuration_manager.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/container/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/container/oidc_authlib_container_factory.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/open_telemetry/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/open_telemetry/attribute_names.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/open_telemetry/span_names.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/py.typed +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/cache_to_collection_mapper.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/memory_storage_factory.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/mongo_gridfs_db.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/mongo_gridfs_exception.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/mongo_storage_factory.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/storage_factory.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/storage_factory_creator.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/cached.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/environment/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/environment/abstract_environment_variables.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/environment/oidc_environment_variables.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/log_levels.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/logging_response.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/logging_transport.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/mongo_url_utils.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/url_validator.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/SOURCES.txt +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/dependency_links.txt +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/not-zip-safe +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/requires.txt +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/top_level.txt +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/setup.cfg +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/setup.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/cache/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/cache/test_oauth_memory_cache.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader_register.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader_thread_safety.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/conftest.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/dcr/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/dcr/test_dcr_client.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/dcr/test_dcr_manager.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/test_request_scope_middleware.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/test_token_reader_middleware.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_auth.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_base_db_model.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_cache_item.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_token.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/memory/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/memory/test_memory_repository.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/test_mongo_repository.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/test_mongo_repository_real.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_auth_helper.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_auth_helper2.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_auth_manager.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_register_dynamic_provider.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/test_auth_server_metadata_discovery.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/test_well_known_configuration_cache.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/test_well_known_configuration_manager.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/conftest.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_mongo_gridfs_db.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_mongo_gridfs_race_setup.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_mongo_store_factory.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_storage_factory_security.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/test_mongo_url_utils.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/test_simple.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/__init__.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/test_cached.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/test_mongo_url_utils.py +0 -0
- {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/test_url_validator.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.0.5
|
|
@@ -46,7 +46,16 @@ class DcrClient:
|
|
|
46
46
|
if contacts:
|
|
47
47
|
payload["contacts"] = contacts
|
|
48
48
|
|
|
49
|
-
logger.info(
|
|
49
|
+
logger.info(
|
|
50
|
+
"DCR: Sending registration request to '%s' with payload keys: %s",
|
|
51
|
+
registration_url,
|
|
52
|
+
sorted(payload.keys()),
|
|
53
|
+
)
|
|
54
|
+
logger.debug(
|
|
55
|
+
"DCR: Full registration payload for '%s': %s",
|
|
56
|
+
registration_url,
|
|
57
|
+
payload,
|
|
58
|
+
)
|
|
50
59
|
|
|
51
60
|
async with httpx.AsyncClient(timeout=self._timeout_seconds) as client:
|
|
52
61
|
response = await client.post(
|
|
@@ -57,6 +66,12 @@ class DcrClient:
|
|
|
57
66
|
try:
|
|
58
67
|
response.raise_for_status()
|
|
59
68
|
except httpx.HTTPStatusError as e:
|
|
69
|
+
logger.error(
|
|
70
|
+
"DCR: Registration failed at '%s' — HTTP %s. Response body: %s",
|
|
71
|
+
registration_url,
|
|
72
|
+
e.response.status_code,
|
|
73
|
+
e.response.text[:500],
|
|
74
|
+
)
|
|
60
75
|
raise ValueError(
|
|
61
76
|
f"DCR registration failed at '{registration_url}' "
|
|
62
77
|
f"with status {e.response.status_code}"
|
|
@@ -65,14 +80,27 @@ class DcrClient:
|
|
|
65
80
|
|
|
66
81
|
if "client_id" not in dcr_response:
|
|
67
82
|
response_keys: list[str] = sorted(dcr_response.keys())
|
|
83
|
+
logger.error(
|
|
84
|
+
"DCR: Response from '%s' missing 'client_id'. Keys present: %s",
|
|
85
|
+
registration_url,
|
|
86
|
+
response_keys,
|
|
87
|
+
)
|
|
68
88
|
raise ValueError(
|
|
69
89
|
f"DCR response from '{registration_url}' missing 'client_id'. "
|
|
70
90
|
f"Response keys: {response_keys}"
|
|
71
91
|
)
|
|
72
92
|
|
|
73
93
|
logger.info(
|
|
74
|
-
"DCR successful at '%s'
|
|
94
|
+
"DCR: Registration successful at '%s' — client_id=%s, "
|
|
95
|
+
"has_secret=%s, expires_at=%s",
|
|
75
96
|
registration_url,
|
|
76
97
|
dcr_response["client_id"],
|
|
98
|
+
"client_secret" in dcr_response,
|
|
99
|
+
dcr_response.get("client_secret_expires_at", "not_set"),
|
|
100
|
+
)
|
|
101
|
+
logger.debug(
|
|
102
|
+
"DCR: Full response from '%s': %s",
|
|
103
|
+
registration_url,
|
|
104
|
+
{k: v for k, v in dcr_response.items() if k != "client_secret"},
|
|
77
105
|
)
|
|
78
106
|
return dcr_response
|
|
@@ -52,9 +52,20 @@ class DcrManager:
|
|
|
52
52
|
contacts: list[str] | None = None,
|
|
53
53
|
) -> DcrRegistration | None:
|
|
54
54
|
if client_id:
|
|
55
|
+
logger.info(
|
|
56
|
+
"DCR: Skipping registration for '%s' — client_id already "
|
|
57
|
+
"provided (client_id=%s)",
|
|
58
|
+
auth_provider,
|
|
59
|
+
client_id,
|
|
60
|
+
)
|
|
55
61
|
return None
|
|
56
62
|
|
|
57
63
|
if not registration_url:
|
|
64
|
+
logger.error(
|
|
65
|
+
"DCR: No registration_url and no client_id for '%s' — "
|
|
66
|
+
"cannot resolve credentials",
|
|
67
|
+
auth_provider,
|
|
68
|
+
)
|
|
58
69
|
raise ValueError(
|
|
59
70
|
f"registration_url is required for DCR when client_id is not "
|
|
60
71
|
f"provided (auth_provider='{auth_provider}')"
|
|
@@ -62,19 +73,43 @@ class DcrManager:
|
|
|
62
73
|
|
|
63
74
|
validate_url(registration_url)
|
|
64
75
|
|
|
76
|
+
logger.info(
|
|
77
|
+
"DCR: Resolving credentials for '%s' via registration_url='%s'",
|
|
78
|
+
auth_provider,
|
|
79
|
+
registration_url,
|
|
80
|
+
)
|
|
81
|
+
|
|
65
82
|
cached = await self._find_cached(
|
|
66
83
|
auth_provider=auth_provider,
|
|
67
84
|
registration_url=registration_url,
|
|
68
85
|
)
|
|
69
86
|
|
|
70
87
|
if cached and not self._is_expired(cached):
|
|
71
|
-
logger.
|
|
72
|
-
"Using cached
|
|
88
|
+
logger.info(
|
|
89
|
+
"DCR: Using cached credentials for '%s' — client_id=%s, "
|
|
90
|
+
"expires_at=%s",
|
|
73
91
|
auth_provider,
|
|
74
92
|
cached.client_id,
|
|
93
|
+
cached.client_secret_expires_at or "never",
|
|
75
94
|
)
|
|
76
95
|
return cached
|
|
77
96
|
|
|
97
|
+
if cached and self._is_expired(cached):
|
|
98
|
+
logger.info(
|
|
99
|
+
"DCR: Cached credentials for '%s' are expired "
|
|
100
|
+
"(client_id=%s, expired_at=%s) — re-registering",
|
|
101
|
+
auth_provider,
|
|
102
|
+
cached.client_id,
|
|
103
|
+
cached.client_secret_expires_at,
|
|
104
|
+
)
|
|
105
|
+
else:
|
|
106
|
+
logger.info(
|
|
107
|
+
"DCR: No cached credentials found for '%s' — performing "
|
|
108
|
+
"new registration at '%s'",
|
|
109
|
+
auth_provider,
|
|
110
|
+
registration_url,
|
|
111
|
+
)
|
|
112
|
+
|
|
78
113
|
dcr_response = await self._dcr_client.register(
|
|
79
114
|
registration_url=registration_url,
|
|
80
115
|
redirect_uri=self._redirect_uri,
|
|
@@ -84,11 +119,17 @@ class DcrManager:
|
|
|
84
119
|
contacts=contacts,
|
|
85
120
|
)
|
|
86
121
|
|
|
87
|
-
|
|
122
|
+
registration = await self._persist(
|
|
88
123
|
auth_provider=auth_provider,
|
|
89
124
|
registration_url=registration_url,
|
|
90
125
|
dcr_response=dcr_response,
|
|
91
126
|
)
|
|
127
|
+
logger.info(
|
|
128
|
+
"DCR: Persisted credentials for '%s' — client_id=%s",
|
|
129
|
+
auth_provider,
|
|
130
|
+
registration.client_id,
|
|
131
|
+
)
|
|
132
|
+
return registration
|
|
92
133
|
|
|
93
134
|
async def _find_cached(
|
|
94
135
|
self,
|
|
@@ -96,6 +137,13 @@ class DcrManager:
|
|
|
96
137
|
auth_provider: str,
|
|
97
138
|
registration_url: str,
|
|
98
139
|
) -> DcrRegistration | None:
|
|
140
|
+
logger.debug(
|
|
141
|
+
"DCR: Querying cache for auth_provider='%s', "
|
|
142
|
+
"registration_url='%s', collection='%s'",
|
|
143
|
+
auth_provider,
|
|
144
|
+
registration_url,
|
|
145
|
+
self._collection_name,
|
|
146
|
+
)
|
|
99
147
|
results = await self._repository.find_many(
|
|
100
148
|
collection_name=self._collection_name,
|
|
101
149
|
model_class=DcrRegistration,
|
|
@@ -104,6 +152,20 @@ class DcrManager:
|
|
|
104
152
|
"registration_url": registration_url,
|
|
105
153
|
},
|
|
106
154
|
)
|
|
155
|
+
if results:
|
|
156
|
+
logger.debug(
|
|
157
|
+
"DCR: Cache hit for '%s' — found %d result(s), "
|
|
158
|
+
"client_id=%s",
|
|
159
|
+
auth_provider,
|
|
160
|
+
len(results),
|
|
161
|
+
results[0].client_id,
|
|
162
|
+
)
|
|
163
|
+
else:
|
|
164
|
+
logger.debug(
|
|
165
|
+
"DCR: Cache miss for '%s' at '%s'",
|
|
166
|
+
auth_provider,
|
|
167
|
+
registration_url,
|
|
168
|
+
)
|
|
107
169
|
return results[0] if results else None
|
|
108
170
|
|
|
109
171
|
@staticmethod
|
oidcauthlib-3.0.4/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.0.4
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/request_scope_middleware.py
RENAMED
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/token_reader_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/memory/memory_repository.py
RENAMED
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/mongo/mongo_repository.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/container/oidc_authlib_container_factory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader_register.py
RENAMED
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader_thread_safety.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/test_request_scope_middleware.py
RENAMED
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/test_token_reader_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/memory/test_memory_repository.py
RENAMED
|
File without changes
|
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/test_mongo_repository.py
RENAMED
|
File without changes
|
{oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/test_mongo_repository_real.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|