Refactor OIDC tests to better mimic an actual OIDC provider. (#13910)
This implements a fake OIDC server, which intercepts calls to the HTTP client. Improves accuracy of tests by covering more internal methods. One particular example was the ID token validation, which previously mocked. This uncovered an incorrect dependency: Synapse actually requires at least authlib 0.15.1, not 0.14.0.
Showing
- changelog.d/13910.misc 1 addition, 0 deletionschangelog.d/13910.misc
- pyproject.toml 1 addition, 1 deletionpyproject.toml
- synapse/handlers/oidc.py 11 additions, 4 deletionssynapse/handlers/oidc.py
- tests/federation/test_federation_client.py 7 additions, 29 deletionstests/federation/test_federation_client.py
- tests/handlers/test_oidc.py 250 additions, 330 deletionstests/handlers/test_oidc.py
- tests/rest/client/test_auth.py 23 additions, 9 deletionstests/rest/client/test_auth.py
- tests/rest/client/test_login.py 26 additions, 14 deletionstests/rest/client/test_login.py
- tests/rest/client/utils.py 71 additions, 65 deletionstests/rest/client/utils.py
- tests/test_utils/__init__.py 32 additions, 8 deletionstests/test_utils/__init__.py
- tests/test_utils/oidc.py 325 additions, 0 deletionstests/test_utils/oidc.py
changelog.d/13910.misc
0 → 100644
This diff is collapsed.
tests/test_utils/oidc.py
0 → 100644
Please register or sign in to comment