mirror of
https://github.com/bitwarden/jslib
synced 2025-12-22 03:03:15 +00:00
25 lines
580 B
TypeScript
25 lines
580 B
TypeScript
import { LoginApi } from '../api/loginApi';
|
|
import { LoginUriApi } from '../api/loginUriApi';
|
|
|
|
import { LoginUriData } from './loginUriData';
|
|
|
|
export class LoginData {
|
|
uris: LoginUriData[];
|
|
username: string;
|
|
password: string;
|
|
totp: string;
|
|
|
|
constructor(data: LoginApi) {
|
|
this.username = data.username;
|
|
this.password = data.password;
|
|
this.totp = data.totp;
|
|
|
|
if (data.uris) {
|
|
this.uris = [];
|
|
data.uris.forEach((u) => {
|
|
this.uris.push(new LoginUriData(u));
|
|
});
|
|
}
|
|
}
|
|
}
|