feat(account): Implement account and organization management features

This commit is contained in:
2024-10-06 23:56:03 +02:00
parent 2c0e771da2
commit f7600ca83f
26 changed files with 1036 additions and 240 deletions
+6 -5
View File
@@ -81,23 +81,23 @@ export class IdpClient {
new plugins.smartrx.rxjs.Subject<plugins.lointReception.data.TLoginStatus>();
public ssoStore = new plugins.webstore.WebStore({
storeName: 'wgsso',
dbName: 'wgsso',
storeName: 'idpglobalStore',
dbName: 'main',
});
public async storeJwt(jwtString: string) {
await this.ssoStore.set('wgJwt', jwtString);
await this.ssoStore.set('idpJwt', jwtString);
}
public async getJwt(): Promise<string> {
return await this.ssoStore.get('wgJwt');
return await this.ssoStore.get('idpJwt');
}
public async getJwtData(): Promise<plugins.lointReception.data.IJwt> {
return this.helpers.extractDataFromJwtString(await this.getJwt());
}
public async deleteJwt() {
await this.ssoStore.delete('wgJwt');
await this.ssoStore.delete('idpJwt');
console.log('removed jwt');
}
@@ -333,6 +333,7 @@ export class IdpClient {
* gets the current OrganizationRoles
*/
public async getRolesAndOrganizations() {
console.log('idpclient: getting roles and orgs...');
await this.typedsocketDeferred.promise;
const rolesAndOrganizationsForUserId =
this.typedsocket.createTypedRequest<plugins.lointReception.request.IReq_GetRolesAndOrganizationsForUserId>(