1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-17 16:53:20 +00:00

Add headers for client type and client version (#651)

This commit is contained in:
Oscar Hinton
2022-02-08 11:18:10 +01:00
committed by GitHub
parent 6b8508579f
commit 8130fce404
6 changed files with 35 additions and 10 deletions

View File

@@ -3,6 +3,7 @@ import { TokenRequest, TokenRequestTwoFactor } from "./tokenRequest";
import { CaptchaProtectedRequest } from "../captchaProtectedRequest";
import { DeviceRequest } from "../deviceRequest";
import { ClientType } from "../../../enums/clientType";
import { Utils } from "../../../misc/utils";
export class PasswordTokenRequest extends TokenRequest implements CaptchaProtectedRequest {
@@ -16,7 +17,7 @@ export class PasswordTokenRequest extends TokenRequest implements CaptchaProtect
super(twoFactor, device);
}
toIdentityToken(clientId: string) {
toIdentityToken(clientId: ClientType) {
const obj = super.toIdentityToken(clientId);
obj.grant_type = "password";