summary refs log tree commit diff
path: root/tests/handlers/test_device.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add some type hints to the tests.handlers module. (#12207)Patrick Cloke2022-03-111-36/+40
|
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-2/+2
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Delete messages from `device_inbox` table when deleting device (#10969)Dirk Klimpel2021-10-271-0/+31
| | | Fixes: #9346
* MSC2918 Refresh tokens implementation (#9450)Quentin Gliech2021-06-241-1/+1
| | | | | | | | | | This implements refresh tokens, as defined by MSC2918 This MSC has been implemented client side in Hydrogen Web: vector-im/hydrogen-web#235 The basics of the MSC works: requesting refresh tokens on login, having the access tokens expire, and using the refresh token to get a new one. Signed-off-by: Quentin Gliech <quentingliech@gmail.com>
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+3
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Apply an IP range blacklist to push and key revocation requests. (#8821)Patrick Cloke2020-12-021-2/+2
| | | | | | | | | | | | Replaces the `federation_ip_range_blacklist` configuration setting with an `ip_range_blacklist` setting with wider scope. It now applies to: * Federation * Identity servers * Push notifications * Checking key validitity for third-party invite events The old `federation_ip_range_blacklist` setting is still honored if present, but with reduced scope (it only applies to federation and identity servers).
* Add ability for access tokens to belong to one user but grant access to ↵Erik Johnston2020-10-291-1/+1
| | | | | | | | | | another user. (#8616) We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't). A future PR will add an API for creating such a token. When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
* Add support for MSC2697: Dehydrated devices (#8380)Hubert Chathi2020-10-071-0/+82
| | | | This allows a user to store an offline device on the server and then restore it at a subsequent login.
* Create function to check for long names in devices (#8364)Dionysis Grigoropoulos2020-09-221-0/+11
| | | | | | | | | * Create a new function to verify that the length of a device name is under a certain threshold. * Refactor old code and tests to use said function. * Verify device name length during registration of device * Add a test for the above Signed-off-by: Dionysis Grigoropoulos <dgrig@erethon.com>
* Convert device handler to async/await (#7871)Patrick Cloke2020-07-171-8/+5
|
* Reject device display names that are too long (#6882)Patrick Cloke2020-02-101-0/+18
| | | | | | | | * Reject device display names that are too long. Too long is currently defined as 100 characters in length. * Add a regression test for rejecting a too long device display name.
* Fix tests on postgresql (#3740)Amber Brown2018-09-041-68/+75
|
* Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
|
* Run black.black2018-08-101-44/+54
|
* run isortAmber Brown2018-07-091-1/+1
|
* Fix upErik Johnston2017-06-271-2/+1
|
* Implement device key caching over federationErik Johnston2017-01-261-9/+9
|
* Implement updating devicesRichard van der Hoff2016-07-261-0/+16
| | | | You can update the displayname of devices now.
* Implement deleting devicesRichard van der Hoff2016-07-261-2/+20
|
* make /devices return a listRichard van der Hoff2016-07-211-4/+7
| | | | Turns out I specced this to return a list of devices rather than a dict of them
* Fix PEP8 errorsRichard van der Hoff2016-07-211-0/+1
|
* Implement GET /device/{deviceId}Richard van der Hoff2016-07-211-10/+27
|
* Fix PEP8 errorsRichard van der Hoff2016-07-201-1/+1
|
* GET /devices endpointRichard van der Hoff2016-07-201-12/+66
| | | | | | | implement a GET /devices endpoint which lists all of the user's devices. It also returns the last IP where we saw that device, so there is some dancing to fish that out of the user_ips table.
* Add device_id support to /loginRichard van der Hoff2016-07-181-0/+75
Add a 'devices' table to the storage, as well as a 'device_id' column to refresh_tokens. Allow the client to pass a device_id, and initial_device_display_name, to /login. If login is successful, then register the device in the devices table if it wasn't known already. If no device_id was supplied, make one up. Associate the device_id with the access token and refresh token, so that we can get at it again later. Ensure that the device_id is copied from the refresh token to the access_token when the token is refreshed.