mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
@@ -127,10 +127,10 @@ export class SsoConfigApi extends BaseResponse {
|
||||
this.idpX509PublicCert = this.getResponseProperty("IdpX509PublicCert");
|
||||
this.idpOutboundSigningAlgorithm = this.getResponseProperty("IdpOutboundSigningAlgorithm");
|
||||
this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty(
|
||||
"IdpAllowUnsolicitedAuthnResponse"
|
||||
"IdpAllowUnsolicitedAuthnResponse",
|
||||
);
|
||||
this.idpDisableOutboundLogoutRequests = this.getResponseProperty(
|
||||
"IdpDisableOutboundLogoutRequests"
|
||||
"IdpDisableOutboundLogoutRequests",
|
||||
);
|
||||
this.idpWantAuthnRequestsSigned = this.getResponseProperty("IdpWantAuthnRequestsSigned");
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export class PasswordLoginCredentials {
|
||||
public email: string,
|
||||
public masterPassword: string,
|
||||
public captchaToken?: string,
|
||||
public twoFactor?: TokenTwoFactorRequest
|
||||
public twoFactor?: TokenTwoFactorRequest,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -26,14 +26,17 @@ export class SsoLoginCredentials {
|
||||
public codeVerifier: string,
|
||||
public redirectUrl: string,
|
||||
public orgId: string,
|
||||
public twoFactor?: TokenTwoFactorRequest
|
||||
public twoFactor?: TokenTwoFactorRequest,
|
||||
) {}
|
||||
}
|
||||
|
||||
export class UserApiLoginCredentials {
|
||||
readonly type = AuthenticationType.UserApi;
|
||||
|
||||
constructor(public clientId: string, public clientSecret: string) {}
|
||||
constructor(
|
||||
public clientId: string,
|
||||
public clientSecret: string,
|
||||
) {}
|
||||
}
|
||||
|
||||
export class AuthRequestLoginCredentials {
|
||||
@@ -46,7 +49,7 @@ export class AuthRequestLoginCredentials {
|
||||
public decryptedUserKey: UserKey,
|
||||
public decryptedMasterKey: MasterKey,
|
||||
public decryptedMasterKeyHash: string,
|
||||
public twoFactor?: TokenTwoFactorRequest
|
||||
public twoFactor?: TokenTwoFactorRequest,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -56,6 +59,6 @@ export class WebAuthnLoginCredentials {
|
||||
constructor(
|
||||
public token: string,
|
||||
public deviceResponse: WebAuthnLoginAssertionResponseRequest,
|
||||
public prfKey?: SymmetricCryptoKey
|
||||
public prfKey?: SymmetricCryptoKey,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ export class TrustedDeviceUserDecryptionOption {
|
||||
constructor(
|
||||
public hasAdminApproval: boolean,
|
||||
public hasLoginApprovingDevice: boolean,
|
||||
public hasManageResetPasswordPermission: boolean
|
||||
public hasManageResetPasswordPermission: boolean,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ export class CreateAuthRequest {
|
||||
readonly deviceIdentifier: string,
|
||||
readonly publicKey: string,
|
||||
readonly type: AuthRequestType,
|
||||
readonly accessCode: string
|
||||
readonly accessCode: string,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export class PasswordTokenRequest extends TokenRequest implements CaptchaProtect
|
||||
public masterPasswordHash: string,
|
||||
public captchaResponse: string,
|
||||
protected twoFactor: TokenTwoFactorRequest,
|
||||
device?: DeviceRequest
|
||||
device?: DeviceRequest,
|
||||
) {
|
||||
super(twoFactor, device);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export class SsoTokenRequest extends TokenRequest {
|
||||
public codeVerifier: string,
|
||||
public redirectUri: string,
|
||||
protected twoFactor: TokenTwoFactorRequest,
|
||||
device?: DeviceRequest
|
||||
device?: DeviceRequest,
|
||||
) {
|
||||
super(twoFactor, device);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ export class TokenTwoFactorRequest {
|
||||
constructor(
|
||||
public provider: TwoFactorProviderType = null,
|
||||
public token: string = null,
|
||||
public remember: boolean = false
|
||||
public remember: boolean = false,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ export abstract class TokenRequest {
|
||||
protected device?: DeviceRequest;
|
||||
protected authRequest: string;
|
||||
|
||||
constructor(protected twoFactor?: TokenTwoFactorRequest, device?: DeviceRequest) {
|
||||
constructor(
|
||||
protected twoFactor?: TokenTwoFactorRequest,
|
||||
device?: DeviceRequest,
|
||||
) {
|
||||
this.device = device != null ? device : null;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ export class UserApiTokenRequest extends TokenRequest {
|
||||
public clientId: string,
|
||||
public clientSecret: string,
|
||||
protected twoFactor: TokenTwoFactorRequest,
|
||||
device?: DeviceRequest
|
||||
device?: DeviceRequest,
|
||||
) {
|
||||
super(twoFactor, device);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export class WebAuthnLoginTokenRequest extends TokenRequest {
|
||||
constructor(
|
||||
public token: string,
|
||||
public deviceResponse: WebAuthnLoginAssertionResponseRequest,
|
||||
device?: DeviceRequest
|
||||
device?: DeviceRequest,
|
||||
) {
|
||||
super(undefined, device);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ export class PasswordlessAuthRequest {
|
||||
readonly key: string,
|
||||
readonly masterPasswordHash: string,
|
||||
readonly deviceIdentifier: string,
|
||||
readonly requestApproved: boolean
|
||||
readonly requestApproved: boolean,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export class SetKeyConnectorKeyRequest {
|
||||
kdf: KdfType,
|
||||
kdfConfig: KdfConfig,
|
||||
orgIdentifier: string,
|
||||
keys: KeysRequest
|
||||
keys: KeysRequest,
|
||||
) {
|
||||
this.key = key;
|
||||
this.kdf = kdf;
|
||||
|
||||
@@ -21,7 +21,7 @@ export class SetPasswordRequest {
|
||||
kdf: KdfType,
|
||||
kdfIterations: number,
|
||||
kdfMemory?: number,
|
||||
kdfParallelism?: number
|
||||
kdfParallelism?: number,
|
||||
) {
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
this.key = key;
|
||||
|
||||
@@ -36,7 +36,7 @@ export class AuthRequestResponse extends BaseResponse {
|
||||
requestDate.getUTCHours(),
|
||||
requestDate.getUTCMinutes(),
|
||||
requestDate.getUTCSeconds(),
|
||||
requestDate.getUTCMilliseconds()
|
||||
requestDate.getUTCMilliseconds(),
|
||||
);
|
||||
|
||||
const dateNow = new Date(Date.now());
|
||||
@@ -47,7 +47,7 @@ export class AuthRequestResponse extends BaseResponse {
|
||||
dateNow.getUTCHours(),
|
||||
dateNow.getUTCMinutes(),
|
||||
dateNow.getUTCSeconds(),
|
||||
dateNow.getUTCMilliseconds()
|
||||
dateNow.getUTCMilliseconds(),
|
||||
);
|
||||
|
||||
this.isExpired = dateNowUTC - requestDateUTC >= RequestTimeOut;
|
||||
|
||||
@@ -7,10 +7,10 @@ export class DeviceVerificationResponse extends BaseResponse {
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.isDeviceVerificationSectionEnabled = this.getResponseProperty(
|
||||
"IsDeviceVerificationSectionEnabled"
|
||||
"IsDeviceVerificationSectionEnabled",
|
||||
);
|
||||
this.unknownDeviceVerificationEnabled = this.getResponseProperty(
|
||||
"UnknownDeviceVerificationEnabled"
|
||||
"UnknownDeviceVerificationEnabled",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ export class IdentityTokenResponse extends BaseResponse {
|
||||
this.apiUseKeyConnector = this.getResponseProperty("ApiUseKeyConnector");
|
||||
this.keyConnectorUrl = this.getResponseProperty("KeyConnectorUrl");
|
||||
this.masterPasswordPolicy = new MasterPasswordPolicyResponse(
|
||||
this.getResponseProperty("MasterPasswordPolicy")
|
||||
this.getResponseProperty("MasterPasswordPolicy"),
|
||||
);
|
||||
|
||||
if (response.UserDecryptionOptions) {
|
||||
this.userDecryptionOptions = new UserDecryptionOptionsResponse(
|
||||
this.getResponseProperty("UserDecryptionOptions")
|
||||
this.getResponseProperty("UserDecryptionOptions"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export class IdentityTwoFactorResponse extends BaseResponse {
|
||||
}
|
||||
}
|
||||
this.masterPasswordPolicy = new MasterPasswordPolicyResponse(
|
||||
this.getResponseProperty("MasterPasswordPolicy")
|
||||
this.getResponseProperty("MasterPasswordPolicy"),
|
||||
);
|
||||
|
||||
this.ssoEmail2faSessionToken = this.getResponseProperty("SsoEmail2faSessionToken");
|
||||
|
||||
@@ -22,7 +22,7 @@ export class TrustedDeviceUserDecryptionOptionResponse extends BaseResponse {
|
||||
|
||||
this.hasLoginApprovingDevice = this.getResponseProperty("HasLoginApprovingDevice");
|
||||
this.hasManageResetPasswordPermission = this.getResponseProperty(
|
||||
"HasManageResetPasswordPermission"
|
||||
"HasManageResetPasswordPermission",
|
||||
);
|
||||
|
||||
if (response.EncryptedPrivateKey) {
|
||||
|
||||
@@ -33,17 +33,17 @@ export class UserDecryptionOptionsResponse extends BaseResponse {
|
||||
|
||||
if (response.TrustedDeviceOption) {
|
||||
this.trustedDeviceOption = new TrustedDeviceUserDecryptionOptionResponse(
|
||||
this.getResponseProperty("TrustedDeviceOption")
|
||||
this.getResponseProperty("TrustedDeviceOption"),
|
||||
);
|
||||
}
|
||||
if (response.KeyConnectorOption) {
|
||||
this.keyConnectorOption = new KeyConnectorUserDecryptionOptionResponse(
|
||||
this.getResponseProperty("KeyConnectorOption")
|
||||
this.getResponseProperty("KeyConnectorOption"),
|
||||
);
|
||||
}
|
||||
if (response.WebAuthnPrfOption) {
|
||||
this.webAuthnPrfOption = new WebAuthnPrfDecryptionOptionResponse(
|
||||
this.getResponseProperty("WebAuthnPrfOption")
|
||||
this.getResponseProperty("WebAuthnPrfOption"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { AssertionOptionsResponse } from "../../../services/webauthn-login/response/assertion-options.response";
|
||||
|
||||
export class WebAuthnLoginCredentialAssertionOptionsView {
|
||||
constructor(readonly options: AssertionOptionsResponse, readonly token: string) {}
|
||||
constructor(
|
||||
readonly options: AssertionOptionsResponse,
|
||||
readonly token: string,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@ export class WebAuthnLoginCredentialAssertionView {
|
||||
constructor(
|
||||
readonly token: string,
|
||||
readonly deviceResponse: WebAuthnLoginAssertionResponseRequest,
|
||||
readonly prfKey?: PrfKey
|
||||
readonly prfKey?: PrfKey,
|
||||
) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user