Further registration refactoring
* `RegistrationHandler.appservice_register` no longer issues an access token: instead it is left for the caller to do it. (There are two of these, one in `synapse/rest/client/v1/register.py`, which now simply calls `AuthHandler.issue_access_token`, and the other in `synapse/rest/client/v2_alpha/register.py`, which is covered below). * In `synapse/rest/client/v2_alpha/register.py`, move the generation of access_tokens into `_create_registration_details`. This means that the normal flow no longer needs to call `AuthHandler.issue_access_token`; the shared-secret flow can tell `RegistrationHandler.register` not to generate a token; and the appservice flow continues to work despite the above change.
Showing
- synapse/handlers/register.py 8 additions, 5 deletionssynapse/handlers/register.py
- synapse/rest/client/v1/register.py 3 additions, 1 deletionsynapse/rest/client/v1/register.py
- synapse/rest/client/v2_alpha/register.py 37 additions, 13 deletionssynapse/rest/client/v2_alpha/register.py
- synapse/storage/registration.py 4 additions, 2 deletionssynapse/storage/registration.py
- tests/rest/client/v2_alpha/test_register.py 5 additions, 1 deletiontests/rest/client/v2_alpha/test_register.py
Loading
Please register or sign in to comment