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.
Files changed (133) hide show
  1. {oidcauthlib-3.0.4/oidcauthlib.egg-info → oidcauthlib-3.0.5}/PKG-INFO +1 -1
  2. oidcauthlib-3.0.5/VERSION +1 -0
  3. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/dcr_client.py +30 -2
  4. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/dcr_manager.py +65 -3
  5. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5/oidcauthlib.egg-info}/PKG-INFO +1 -1
  6. oidcauthlib-3.0.4/VERSION +0 -1
  7. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/LICENSE +0 -0
  8. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/MANIFEST.in +0 -0
  9. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/Makefile +0 -0
  10. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/README.md +0 -0
  11. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/__init__.py +0 -0
  12. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/__init__.py +0 -0
  13. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/auth_helper.py +0 -0
  14. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/auth_manager.py +0 -0
  15. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/__init__.py +0 -0
  16. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/oauth_cache.py +0 -0
  17. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/oauth_memory_cache.py +0 -0
  18. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/cache/oauth_mongo_cache.py +0 -0
  19. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/config/__init__.py +0 -0
  20. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/config/auth_config.py +0 -0
  21. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/config/auth_config_reader.py +0 -0
  22. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/__init__.py +0 -0
  23. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/dcr/dcr_registration.py +0 -0
  24. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/__init__.py +0 -0
  25. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_bearer_token_expired_exception.py +0 -0
  26. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_bearer_token_invalid_exception.py +0 -0
  27. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_bearer_token_missing_exception.py +0 -0
  28. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/exceptions/authorization_needed_exception.py +0 -0
  29. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/fastapi_auth_manager.py +0 -0
  30. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/__init__.py +0 -0
  31. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/request_scope_middleware.py +0 -0
  32. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/middleware/token_reader_middleware.py +0 -0
  33. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/__init__.py +0 -0
  34. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/auth.py +0 -0
  35. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/base_db_model.py +0 -0
  36. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/cache_item.py +0 -0
  37. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/client_key_set.py +0 -0
  38. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/models/token.py +0 -0
  39. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/__init__.py +0 -0
  40. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/base_repository.py +0 -0
  41. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/memory/__init__.py +0 -0
  42. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/memory/memory_repository.py +0 -0
  43. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/mongo/__init__.py +0 -0
  44. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/mongo/mongo_repository.py +0 -0
  45. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/repository/repository_factory.py +0 -0
  46. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/routers/__init__.py +0 -0
  47. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/routers/auth_router.py +0 -0
  48. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/token_reader.py +0 -0
  49. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/__init__.py +0 -0
  50. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/auth_server_metadata.py +0 -0
  51. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/auth_server_metadata_discovery.py +0 -0
  52. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/well_known_configuration_cache.py +0 -0
  53. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/well_known_configuration_cache_result.py +0 -0
  54. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/auth/well_known_configuration/well_known_configuration_manager.py +0 -0
  55. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/container/__init__.py +0 -0
  56. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/container/oidc_authlib_container_factory.py +0 -0
  57. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/open_telemetry/__init__.py +0 -0
  58. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/open_telemetry/attribute_names.py +0 -0
  59. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/open_telemetry/span_names.py +0 -0
  60. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/py.typed +0 -0
  61. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/__init__.py +0 -0
  62. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/cache_to_collection_mapper.py +0 -0
  63. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/memory_storage_factory.py +0 -0
  64. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/mongo_gridfs_db.py +0 -0
  65. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/mongo_gridfs_exception.py +0 -0
  66. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/mongo_storage_factory.py +0 -0
  67. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/storage_factory.py +0 -0
  68. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/storage/storage_factory_creator.py +0 -0
  69. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/__init__.py +0 -0
  70. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/cached.py +0 -0
  71. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/environment/__init__.py +0 -0
  72. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/environment/abstract_environment_variables.py +0 -0
  73. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/environment/oidc_environment_variables.py +0 -0
  74. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/__init__.py +0 -0
  75. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/log_levels.py +0 -0
  76. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/logging_response.py +0 -0
  77. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/logger/logging_transport.py +0 -0
  78. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/mongo_url_utils.py +0 -0
  79. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib/utilities/url_validator.py +0 -0
  80. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/SOURCES.txt +0 -0
  81. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/dependency_links.txt +0 -0
  82. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/not-zip-safe +0 -0
  83. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/requires.txt +0 -0
  84. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/oidcauthlib.egg-info/top_level.txt +0 -0
  85. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/setup.cfg +0 -0
  86. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/setup.py +0 -0
  87. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/__init__.py +0 -0
  88. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/__init__.py +0 -0
  89. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/cache/__init__.py +0 -0
  90. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/cache/test_oauth_memory_cache.py +0 -0
  91. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/__init__.py +0 -0
  92. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config.py +0 -0
  93. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader.py +0 -0
  94. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader_register.py +0 -0
  95. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/config/test_auth_config_reader_thread_safety.py +0 -0
  96. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/conftest.py +0 -0
  97. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/dcr/__init__.py +0 -0
  98. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/dcr/test_dcr_client.py +0 -0
  99. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/dcr/test_dcr_manager.py +0 -0
  100. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/__init__.py +0 -0
  101. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/test_request_scope_middleware.py +0 -0
  102. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/middleware/test_token_reader_middleware.py +0 -0
  103. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/__init__.py +0 -0
  104. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_auth.py +0 -0
  105. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_base_db_model.py +0 -0
  106. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_cache_item.py +0 -0
  107. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/models/test_token.py +0 -0
  108. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/__init__.py +0 -0
  109. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/memory/__init__.py +0 -0
  110. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/memory/test_memory_repository.py +0 -0
  111. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/__init__.py +0 -0
  112. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/test_mongo_repository.py +0 -0
  113. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/repository/mongo/test_mongo_repository_real.py +0 -0
  114. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_auth_helper.py +0 -0
  115. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_auth_helper2.py +0 -0
  116. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_auth_manager.py +0 -0
  117. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/test_register_dynamic_provider.py +0 -0
  118. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/__init__.py +0 -0
  119. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/test_auth_server_metadata_discovery.py +0 -0
  120. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/test_well_known_configuration_cache.py +0 -0
  121. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/auth/well_known_configuration/test_well_known_configuration_manager.py +0 -0
  122. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/conftest.py +0 -0
  123. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/__init__.py +0 -0
  124. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_mongo_gridfs_db.py +0 -0
  125. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_mongo_gridfs_race_setup.py +0 -0
  126. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_mongo_store_factory.py +0 -0
  127. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/storage/test_storage_factory_security.py +0 -0
  128. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/test_mongo_url_utils.py +0 -0
  129. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/test_simple.py +0 -0
  130. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/__init__.py +0 -0
  131. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/test_cached.py +0 -0
  132. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/test_mongo_url_utils.py +0 -0
  133. {oidcauthlib-3.0.4 → oidcauthlib-3.0.5}/tests/utilities/test_url_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oidcauthlib
3
- Version: 3.0.4
3
+ Version: 3.0.5
4
4
  Summary: oidcauthlib
5
5
  Home-page: https://github.com/icanbwell/oidc-auth-lib
6
6
  Author: Imran Qureshi
@@ -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("Performing DCR at '%s'", registration_url)
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': client_id=%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.debug(
72
- "Using cached DCR credentials for '%s' (client_id=%s)",
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
- return await self._persist(
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oidcauthlib
3
- Version: 3.0.4
3
+ Version: 3.0.5
4
4
  Summary: oidcauthlib
5
5
  Home-page: https://github.com/icanbwell/oidc-auth-lib
6
6
  Author: Imran Qureshi
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