Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Preparatory refactoring of the OidcHandlerTestCase (#8911)
Browse files Browse the repository at this point in the history
* Remove references to handler._auth_handler

(and replace them with hs.get_auth_handler)

* Factor out a utility function for building Requests

* Remove mocks of `OidcHandler._map_userinfo_to_user`

This method is going away, so mocking it out is no longer a valid approach.

Instead, we mock out lower-level methods (eg _remote_id_from_userinfo), or
simply allow the regular implementation to proceed and update the expectations
accordingly.

* Remove references to `OidcHandler._map_userinfo_to_user` from tests

This method is going away, so we can no longer use it as a test point. Instead
we build mock "callback" requests which we pass into `handle_oidc_callback`,
and verify correct behaviour by mocking out `AuthHandler.complete_sso_login`.
  • Loading branch information
richvdh authored Dec 14, 2020
1 parent f14428b commit 895e043
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 141 deletions.
1 change: 1 addition & 0 deletions changelog.d/8911.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for allowing users to pick their own user ID during a single-sign-on login.
Loading

0 comments on commit 895e043

Please sign in to comment.