Remove jwtPost from backend-api in identity service
This commit is contained in:
parent
95d783ffc1
commit
a761ba1a06
1 changed files with 1 additions and 16 deletions
|
@ -1,10 +1,8 @@
|
||||||
import { Injectable } from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {HttpClient} from '@angular/common/http';
|
import {HttpClient} from '@angular/common/http';
|
||||||
import {Observable, of} from 'rxjs';
|
import {Observable, of} from 'rxjs';
|
||||||
import {catchError, map} from 'rxjs/operators';
|
import {catchError, map} from 'rxjs/operators';
|
||||||
import {environment} from '../environments/environment';
|
import {environment} from '../environments/environment';
|
||||||
import {SigningService} from './signing.service';
|
|
||||||
import {AccountService} from './account.service';
|
|
||||||
import {CryptoService} from './crypto.service';
|
import {CryptoService} from './crypto.service';
|
||||||
import {GlobalVarsService} from './global-vars.service';
|
import {GlobalVarsService} from './global-vars.service';
|
||||||
|
|
||||||
|
@ -26,8 +24,6 @@ export class BackendAPIService {
|
||||||
constructor(
|
constructor(
|
||||||
private httpClient: HttpClient,
|
private httpClient: HttpClient,
|
||||||
private cryptoService: CryptoService,
|
private cryptoService: CryptoService,
|
||||||
private signingService: SigningService,
|
|
||||||
private accountService: AccountService,
|
|
||||||
private globalVars: GlobalVarsService,
|
private globalVars: GlobalVarsService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
|
@ -35,17 +31,6 @@ export class BackendAPIService {
|
||||||
return this.httpClient.post<any>(`${this.endpoint}/${path}`, body);
|
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(
|
GetUsersStateless(
|
||||||
publicKeys: string[]
|
publicKeys: string[]
|
||||||
): Observable<{ UserList: User[]}> {
|
): Observable<{ UserList: User[]}> {
|
||||||
|
|
Loading…
Reference in a new issue