diff --git a/src/app/backend-api.service.ts b/src/app/backend-api.service.ts index e4809bb..b2afa9e 100644 --- a/src/app/backend-api.service.ts +++ b/src/app/backend-api.service.ts @@ -1,10 +1,8 @@ -import { Injectable } from '@angular/core'; +import {Injectable} from '@angular/core'; import {HttpClient} from '@angular/common/http'; import {Observable, of} from 'rxjs'; import {catchError, map} from 'rxjs/operators'; import {environment} from '../environments/environment'; -import {SigningService} from './signing.service'; -import {AccountService} from './account.service'; import {CryptoService} from './crypto.service'; import {GlobalVarsService} from './global-vars.service'; @@ -26,8 +24,6 @@ export class BackendAPIService { constructor( private httpClient: HttpClient, private cryptoService: CryptoService, - private signingService: SigningService, - private accountService: AccountService, private globalVars: GlobalVarsService, ) { } @@ -35,17 +31,6 @@ export class BackendAPIService { return this.httpClient.post(`${this.endpoint}/${path}`, body); } - jwtPost(path: string, publicKey: string, body: any): Observable { - const publicUserInfo = this.accountService.getEncryptedUsers()[publicKey]; - if (!publicUserInfo) { - return of(null); - } - - const seedHex = this.cryptoService.decryptSeedHex(publicUserInfo.encryptedSeedHex, this.globalVars.hostname); - const jwt = this.signingService.signJWT(seedHex); - return this.post(path, {...body, ...{JWT: jwt}}); - } - GetUsersStateless( publicKeys: string[] ): Observable<{ UserList: User[]}> {