0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-13 21:41:30 +01:00

Fix return value in example on password_auth_provider_callbacks.md (#13450)

Fixes: #12534

Signed-off-by: Dirk Klimpel <dirk@klimpel.org>
This commit is contained in:
Dirk Klimpel 2022-08-04 14:03:36 +02:00 committed by GitHub
parent 166fafdf8d
commit afbdbe0634
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/13450.doc Normal file
View file

@ -0,0 +1 @@
Fix example code in module documentation of `password_auth_provider_callbacks`.

View file

@ -263,7 +263,7 @@ class MyAuthProvider:
return None return None
if self.credentials.get(username) == login_dict.get("my_field"): if self.credentials.get(username) == login_dict.get("my_field"):
return self.api.get_qualified_user_id(username) return (self.api.get_qualified_user_id(username), None)
async def check_pass( async def check_pass(
self, self,
@ -280,5 +280,5 @@ class MyAuthProvider:
return None return None
if self.credentials.get(username) == login_dict.get("password"): if self.credentials.get(username) == login_dict.get("password"):
return self.api.get_qualified_user_id(username) return (self.api.get_qualified_user_id(username), None)
``` ```