Changeset View
Changeset View
Standalone View
Standalone View
web/grpc/identity-service-client-wrapper.js
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | class IdentityServiceClientWrapper implements IdentityServiceClient { | ||||
deleteUser: () => Promise<void> = async () => { | deleteUser: () => Promise<void> = async () => { | ||||
if (!this.authClient) { | if (!this.authClient) { | ||||
throw new Error('Identity service client is not initialized'); | throw new Error('Identity service client is not initialized'); | ||||
} | } | ||||
await this.authClient.deleteUser(new Empty()); | await this.authClient.deleteUser(new Empty()); | ||||
}; | }; | ||||
logOut: () => Promise<void> = async () => { | |||||
if (!this.authClient) { | |||||
throw new Error('Identity service client is not initialized'); | |||||
} | |||||
await this.authClient.logOutUser(new Empty()); | |||||
}; | |||||
getKeyserverKeys: (keyserverID: string) => Promise<DeviceOlmOutboundKeys> = | getKeyserverKeys: (keyserverID: string) => Promise<DeviceOlmOutboundKeys> = | ||||
async (keyserverID: string) => { | async (keyserverID: string) => { | ||||
const client = this.authClient; | const client = this.authClient; | ||||
if (!client) { | if (!client) { | ||||
throw new Error('Identity service client is not initialized'); | throw new Error('Identity service client is not initialized'); | ||||
} | } | ||||
const request = new IdentityAuthStructs.OutboundKeysForUserRequest(); | const request = new IdentityAuthStructs.OutboundKeysForUserRequest(); | ||||
▲ Show 20 Lines • Show All 415 Lines • Show Last 20 Lines |