matrix-org / matrix-org/matrix-python-sdk
Support using "User-Interactive Authentication API" for login/register
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 266
- Forks
- 118
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi,
First of all, thanks for the SDK, that helps a lot!
Now onto my issue: I followed MatrixClient's example on registering an user and got back an error about captcha. Could this be a change in Matrix' protocol that wasn't propagated down here?
>>> from matrix_client.client import MatrixClient
>>> client = MatrixClient("https://matrix.org")
>>> token = client.register_with_password(username="foobar1234", password="password")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dryvenn/Downloads/matrix-python-sdk/matrix_client/client.py", line 126, in register_with_password
"m.login.password", user=username, password=password
File "/Users/dryvenn/Downloads/matrix-python-sdk/matrix_client/api.py", line 110, in register
return self._send("POST", "/register", content)
File "/Users/dryvenn/Downloads/matrix-python-sdk/matrix_client/api.py", line 459, in _send
code=response.status_code, content=response.text
matrix_client.errors.MatrixRequestError: 400: {"errcode":"M_UNKNOWN","error":"Captcha is required."}
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit matrix_client/client.py bei MatrixClient.register_with_password und verfolge den Aufruf bis zu den Methoden register und _send in matrix_client/api.py. Reproduziere die gezeigte Registrierungsanfrage gegen matrix.org und prüfe die Anforderungen der User-Interactive Authentication API. Als erledigt gilt die Unterstützung dieser API für Login und Registrierung, anstatt mit der Antwort captcha-required fehlzuschlagen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, authentication
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100