summary refs log tree commit diff
path: root/synapse/rest/client/v1/register.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move v1-only APIs into their own module & isolate deprecated ones (#3460)Amber Brown2018-07-191-436/+0
|
* Merge pull request #3534 from krombel/use_parse_and_asserts_from_servletAmber Brown2018-07-141-19/+5
|\ | | | | Use parse and asserts from http.servlet
| * rename assert_params_in_request to assert_params_in_dictKrombel2018-07-131-5/+5
| | | | | | | | | | | | the method "assert_params_in_request" does handle dicts and not requests. A request body has to be parsed to json before this method can be used
| * Use parse_{int,str} and assert from http.servletKrombel2018-07-131-19/+5
| | | | | | | | | | | | | | parse_integer and parse_string can take a request and raise errors in case we have wrong or missing params. This PR tries to use them more to deduplicate some code and make it better readable
* | Make auth & transactions more testable (#3499)Amber Brown2018-07-141-3/+3
|/
* run isortAmber Brown2018-07-091-9/+10
|
* Remove run_on_reactor (#3395)Amber Brown2018-06-141-7/+0
|
* Construct HMAC as bytes on py3Adrian Tschira2018-04-291-7/+9
| | | | Signed-off-by: Adrian Tschira <nota@notafile.com>
* Add b prefixes to some strings that are bytes in py3Adrian Tschira2018-04-041-2/+2
| | | | | | This has no effect on python2 Signed-off-by: Adrian Tschira <nota@notafile.com>
* rewrite based on PR feedback:Matthew Hodgson2018-01-191-13/+7
| | | | | | | | | * [ ] split config options into allowed_local_3pids and registrations_require_3pid * [ ] simplify and comment logic for picking registration flows * [ ] fix docstring and move check_3pid_allowed into a new util module * [ ] use check_3pid_allowed everywhere @erikjohnston PTAL
* fix up v1, and improve errorsMatthew Hodgson2018-01-191-11/+29
|
* Downcase userids for shared-secret registrationRichard van der Hoff2017-11-101-1/+1
|
* Stop putting a time caveat on access tokensRichard van der Hoff2016-11-291-12/+0
| | | | | | | | The 'time' caveat on the access tokens was something of a lie, since we weren't enforcing it; more pertinently its presence stops us ever adding useful time caveats. Let's move in the right direction by not lying in our caveats.
* rest/client/v1/register: use the correct requester in createUserPatrik Oldsberg2016-10-061-3/+6
| | | | Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
* storage/appservice: make appservice methods only relying on the cache ↵Patrik Oldsberg2016-10-061-1/+1
| | | | synchronous
* Add helper function for getting access_tokens from requestsMark Haines2016-09-091-7/+5
| | | | | | Rather than reimplementing the token parsing in the various places. This will make it easier to change the token parsing to allow access_tokens in HTTP headers.
* Dont invoke get_handlers fromClientV1RestServletErik Johnston2016-08-121-0/+2
| | | | | | hs.get_handlers() can not be invoked from split out processes. Moving the invocations down a level means that we can slowly split out individual servlets.
* Merge pull request #933 from matrix-org/rav/type_annotationsRichard van der Hoff2016-07-201-0/+4
|\ | | | | Type annotations
| * Type annotationsRichard van der Hoff2016-07-191-0/+4
| | | | | | | | | | Add some type annotations to help PyCharm (in particular) to figure out the types of a bunch of things.
* | Further registration refactoringRichard van der Hoff2016-07-191-1/+3
|/ | | | | | | | | | | | | | * `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.
* Bug fix: expire invalid access tokensNegar Fazeli2016-07-131-1/+1
|
* Check that there are no null bytes in user and passswordErik Johnston2016-07-061-0/+6
|
* Add null separator to hmacErik Johnston2016-07-061-0/+2
|
* Add an admin option to shared secret registrationErik Johnston2016-07-051-0/+1
|
* Protect password when registering using shared secretErik Johnston2016-07-051-4/+7
|
* Fix style violationsKent Shikama2016-07-041-1/+2
| | | | Signed-off-by: Kent Shikama <kent@kentshikama.com>
* Use .get() instead of [] to access password_hashKent Shikama2016-07-041-1/+1
|
* Optionally include password hash in createUser endpointKent Shikama2016-07-031-1/+3
| | | | Signed-off-by: Kent Shikama <kent@kentshikama.com>
* Create user with expiryNegi Fazeli2016-05-131-0/+71
| | | | | | - Add unittests for client, api and handler Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
* Add a parse_json_object functionMark Haines2016-03-091-12/+2
| | | | | to deduplicate all the copy+pasted _parse_json functions. Also document the parse_.* functions.
* Fix relative imports so they work in both py3 and py27Mark Haines2016-03-081-1/+1
|
* Rename config field to reflect yaml nameDaniel Wagner-Hall2016-02-031-2/+2
|
* Fix flake8 warnings for new flake8Daniel Wagner-Hall2016-02-021-1/+2
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Update endpoints to reflect current specDaniel Wagner-Hall2015-12-021-1/+1
|
* Host /unstable and /r0 versions of r0 APIsDaniel Wagner-Hall2015-12-011-2/+2
|
* Factor out user id validation checksErik Johnston2015-03-181-9/+5
|
* Do more validation of incoming requestErik Johnston2015-03-181-3/+3
|
* Use 403 instead of 400Erik Johnston2015-03-161-1/+1
|
* Implement registering with shared secret.Erik Johnston2015-03-131-2/+55
|
* Always allow AS to registerErik Johnston2015-02-201-3/+5
|
* Disable registration if config option was set.Erik Johnston2015-02-191-0/+4
|
* Merge pull request #50 from matrix-org/application-servicesMark Haines2015-02-131-1/+23
|\ | | | | Application Services
| * Add m.login.application_service registration procedure.Kegan Dougal2015-02-051-1/+23
| | | | | | | | | | This allows known application services to register any user ID under their own user namespace(s).
* | Blunty replace json with simplejsonErik Johnston2015-02-111-1/+1
|/
* Extract the client v1 base RestServlet to a separate classMark Haines2015-01-231-2/+2
|
* Move rest APIs back under the rest directoryMark Haines2015-01-221-0/+291