This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow for identifier
dicts in User Interactive Auth dicts
#7438
Closed
Closed
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b674bb8
Move utility methods from login handler to auth handler
anoadragon453 7044c1f
Factor out identifier -> username conversion into its own method
anoadragon453 f240a8d
Reconfigure m.login.password authdict checker to process identifiers
anoadragon453 cb64c95
Comment cleanups, log on KeyError during login
anoadragon453 1807115
Remove placeholders/dummy classes for supporting identifiers in exist…
anoadragon453 358e51b
Add some tests for m.id.phone and m.id.thirdparty
anoadragon453 699904c
Changelog
anoadragon453 7184c16
Change login_id_phone_to_thirdparty to return a dict again
anoadragon453 1876235
pop() instead of pull then del
anoadragon453 b8f4b0c
Use assert_param_in_dict
anoadragon453 efb5670
Update synapse/handlers/auth.py
anoadragon453 53981c3
Change SynapseError comment
anoadragon453 b1c0eb3
Docstring spacing
anoadragon453 d9277e9
Don't lowercase medium in this PR
anoadragon453 cb272bc
Explain why we rate-limit using a threepid
anoadragon453 af21fbb
Simplify medium and address assignment
anoadragon453 7affcd0
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/use…
anoadragon453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,11 +38,6 @@ def check_auth(self, authdict, clientip): | |
return succeed(True) | ||
|
||
|
||
class DummyPasswordChecker(UserInteractiveAuthChecker): | ||
def check_auth(self, authdict, clientip): | ||
return succeed(authdict["identifier"]["user"]) | ||
Comment on lines
-41
to
-43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this just not used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was used by 1807115#diff-5fc780094ae3ec668024efd505af6a3dL170 This checker was a patch to allow for identifiers being passed to |
||
|
||
|
||
class FallbackAuthTests(unittest.HomeserverTestCase): | ||
|
||
servlets = [ | ||
|
@@ -166,9 +161,6 @@ class UIAuthTests(unittest.HomeserverTestCase): | |
] | ||
|
||
def prepare(self, reactor, clock, hs): | ||
auth_handler = hs.get_auth_handler() | ||
auth_handler.checkers[LoginType.PASSWORD] = DummyPasswordChecker(hs) | ||
|
||
self.user_pass = "pass" | ||
self.user = self.register_user("test", self.user_pass) | ||
self.user_tok = self.login("test", self.user_pass) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We likely still want a test for the legacy login type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, so the
login
unittest function still uses the old method:synapse/tests/unittest.py
Lines 512 to 518 in c2e1a21
But it may be a better idea to update this to the new format and just have a specific test for the old behaviour?