Remove jwtPost from backend-api in identity service

This commit is contained in:
Daniel Krol 2022-05-04 18:14:46 -04:00
parent 95d783ffc1
commit a761ba1a06

View file

@ -3,8 +3,6 @@ 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<any>(`${this.endpoint}/${path}`, body);
}
jwtPost(path: string, publicKey: string, body: any): Observable<any> {
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[]}> {