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.
* 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
* 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
- 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`.