Commit graph

18 commits

Author SHA1 Message Date
ruben 74827428bd use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00
Travis Ralston f8f9965cc5
Ensure appservices have their devices checked (#554)
The regular device check will return the device for the appservice's bot user instead of going through the user_id branch. The check has been moved to below the user_id check to ensure the right virtual user's device is chosen.
2019-03-21 08:48:21 -06:00
krombel 68131ca7a3 Handle AS with auth header (#548)
* Handle AS with auth header

* fix lint (gocyclo)
2018-07-23 06:40:35 -07:00
Andrew Morgan a56752f3f6
implement AS timestamp massaging (#542) 2018-07-17 08:45:30 -07:00
Anant Prakash 2fb2f7ca7b
Add AS support to common.MakeAuthAPI (#427)
* Add AS support to MakeAuthAPI
Make clientapi utilize the same

Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>

* Add user parameter support to MakeAuthAPI

* Make VerifyAccessToken private, let VerifyUserFromRequest return the
device if present

* Make a dummy device for AS users

* Refactor arguments into auth.Data

* Update routing of all components

* Update code comment

* Use const AppServiceDeviceID

* Handle cases when AS is not masquerading
2018-07-17 03:47:03 +05:30
Anant Prakash b86b55360a Add app service authentication functions (#433)
* Add support for AS ?user= parameter in auth

Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>

* Fix typo
2018-06-01 12:16:19 +01:00
Scott Raine c9add39768 Use http.Status* and http.Method* where appropriate (#417)
Signed-off-by: Scott Raine <me@nylar.io>
2018-03-13 15:55:45 +00:00
Erik Johnston bdc44c4bde Log errors when there is an error validating token (#340) 2017-11-16 15:46:52 +00:00
Erik Johnston 38999c54e1 Generate new devices for each new /login (#281) 2017-10-10 10:40:52 +01:00
Mark Haines 238646ee3c Add contexts to device database (#233)
* Add contexts to device database

* Remove spurious whitespace
2017-09-18 15:51:26 +01:00
Mark Haines 17c60759c4 Add query API for listing active invites (#196)
* Add query API for listing active invites

This lists the invites for a user in a room that could be used to
join the room over federation.

* s/Lookup/Look up/

* Fix implements comments
2017-08-23 15:08:48 +01:00
Mark Haines b06d1124f7 Factor out runTransaction to common code (#162) 2017-07-17 17:20:57 +01:00
Kegsay 50aacd4f3c Hook up registration/login APIs and implement access token generation (#122) 2017-05-30 17:51:40 +01:00
Kegsay 445dce14ae Add in devices_table to store device information (#118) 2017-05-25 13:33:50 +01:00
Kegsay 3b9222e8f7 Glue together devices and auth with the current HTTP code (#117)
- Renamed `clientapi/auth/types` to `clientapi/auth/authtypes` for the same
  horrible namespace clashing reasons as `storage`.
- Factored out `makeAPI` to `common`.
- Added in `makeAuthAPI`.
2017-05-23 17:43:05 +01:00
Robert Swain d09a65abbe Add Apache Version 2.0 license and headers to all golang files 2017-04-21 00:40:52 +02:00
Kegsay 8ba9d4af04 Add /createRoom endpoint and unmarshal HTTP body (#27) 2017-03-07 16:11:08 +00:00
Kegsay 5552e1f3a8 Extract access tokens from HTTP requests (#15) 2017-03-07 13:43:32 +00:00