mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
chore/SRE-583 Deprecate usage of Auth-Email Header (#14418)
* chore/SRE-583 Deprecate usage of Auth-Email Header * SRE-583 additional cleanup * SRE-583 removed Utils * SRE-583 formatting --------- Co-authored-by: sneakernuts <671942+sneakernuts@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a139fb5def
commit
7835d01456
@@ -1,5 +1,4 @@
|
|||||||
import { ClientType } from "../../../../enums";
|
import { ClientType } from "../../../../enums";
|
||||||
import { Utils } from "../../../../platform/misc/utils";
|
|
||||||
|
|
||||||
import { DeviceRequest } from "./device.request";
|
import { DeviceRequest } from "./device.request";
|
||||||
import { TokenTwoFactorRequest } from "./token-two-factor.request";
|
import { TokenTwoFactorRequest } from "./token-two-factor.request";
|
||||||
@@ -30,10 +29,6 @@ export class PasswordTokenRequest extends TokenRequest {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
alterIdentityTokenHeaders(headers: Headers) {
|
|
||||||
headers.set("Auth-Email", Utils.fromUtf8ToUrlB64(this.email));
|
|
||||||
}
|
|
||||||
|
|
||||||
static fromJSON(json: any) {
|
static fromJSON(json: any) {
|
||||||
return Object.assign(Object.create(PasswordTokenRequest.prototype), json, {
|
return Object.assign(Object.create(PasswordTokenRequest.prototype), json, {
|
||||||
device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,
|
device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,
|
||||||
|
|||||||
@@ -14,10 +14,6 @@ export abstract class TokenRequest {
|
|||||||
this.device = device != null ? device : null;
|
this.device = device != null ? device : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
alterIdentityTokenHeaders(headers: Headers) {
|
|
||||||
// Implemented in subclass if required
|
|
||||||
}
|
|
||||||
|
|
||||||
setTwoFactor(twoFactor: TokenTwoFactorRequest | undefined) {
|
setTwoFactor(twoFactor: TokenTwoFactorRequest | undefined) {
|
||||||
this.twoFactor = twoFactor;
|
this.twoFactor = twoFactor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,6 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
if (this.customUserAgent != null) {
|
if (this.customUserAgent != null) {
|
||||||
headers.set("User-Agent", this.customUserAgent);
|
headers.set("User-Agent", this.customUserAgent);
|
||||||
}
|
}
|
||||||
request.alterIdentityTokenHeaders(headers);
|
|
||||||
|
|
||||||
const identityToken =
|
const identityToken =
|
||||||
request instanceof UserApiTokenRequest
|
request instanceof UserApiTokenRequest
|
||||||
|
|||||||
Reference in New Issue
Block a user