diff options
author | Kegsay <kegan@matrix.org> | 2020-07-22 17:04:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 17:04:57 +0100 |
commit | 541a23f712a1cff2e8ba0ada41ceff90e86ee42d (patch) | |
tree | 1fdacfd2b7479dd6a075bb5680b372f9b7939b59 /userapi/api/api.go | |
parent | 1e71fd645ed9bbac87627434b303659a195512c7 (diff) |
Handle inbound federation E2E key queries/claims (#1215)
* Handle inbound /keys/claim and /keys/query requests
* Add display names to device key responses
* Linting
Diffstat (limited to 'userapi/api/api.go')
-rw-r--r-- | userapi/api/api.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/userapi/api/api.go b/userapi/api/api.go index cf0f0563..bd0773f8 100644 --- a/userapi/api/api.go +++ b/userapi/api/api.go @@ -30,6 +30,7 @@ type UserInternalAPI interface { QueryAccessToken(ctx context.Context, req *QueryAccessTokenRequest, res *QueryAccessTokenResponse) error QueryDevices(ctx context.Context, req *QueryDevicesRequest, res *QueryDevicesResponse) error QueryAccountData(ctx context.Context, req *QueryAccountDataRequest, res *QueryAccountDataResponse) error + QueryDeviceInfos(ctx context.Context, req *QueryDeviceInfosRequest, res *QueryDeviceInfosResponse) error } // InputAccountDataRequest is the request for InputAccountData @@ -44,6 +45,19 @@ type InputAccountDataRequest struct { type InputAccountDataResponse struct { } +// QueryDeviceInfosRequest is the request to QueryDeviceInfos +type QueryDeviceInfosRequest struct { + DeviceIDs []string +} + +// QueryDeviceInfosResponse is the response to QueryDeviceInfos +type QueryDeviceInfosResponse struct { + DeviceInfo map[string]struct { + DisplayName string + UserID string + } +} + // QueryAccessTokenRequest is the request for QueryAccessToken type QueryAccessTokenRequest struct { AccessToken string |