unified code verification service
This commit is contained in:
@@ -9,19 +9,22 @@ class PendingLogin {
|
||||
final Account account;
|
||||
final TokenData pendingToken;
|
||||
final String destination;
|
||||
final int ttlSeconds;
|
||||
final SessionIdentifier session;
|
||||
|
||||
final int? ttlSeconds;
|
||||
final int? cooldownSeconds;
|
||||
final DateTime? cooldownUntil;
|
||||
final String? idempotencyKey;
|
||||
|
||||
const PendingLogin({
|
||||
required this.account,
|
||||
required this.pendingToken,
|
||||
required this.destination,
|
||||
required this.ttlSeconds,
|
||||
this.ttlSeconds,
|
||||
required this.session,
|
||||
this.cooldownSeconds,
|
||||
this.cooldownUntil,
|
||||
this.idempotencyKey,
|
||||
});
|
||||
|
||||
factory PendingLogin.fromResponse(
|
||||
@@ -31,7 +34,6 @@ class PendingLogin {
|
||||
account: response.account.account.toDomain(),
|
||||
pendingToken: response.pendingToken,
|
||||
destination: response.destination,
|
||||
ttlSeconds: response.ttlSeconds,
|
||||
session: session,
|
||||
);
|
||||
|
||||
@@ -44,15 +46,17 @@ class PendingLogin {
|
||||
int? cooldownSeconds,
|
||||
DateTime? cooldownUntil,
|
||||
bool clearCooldown = false,
|
||||
String? idempotencyKey,
|
||||
}) {
|
||||
return PendingLogin(
|
||||
account: account ?? this.account,
|
||||
pendingToken: pendingToken ?? this.pendingToken,
|
||||
destination: destination ?? this.destination,
|
||||
ttlSeconds: ttlSeconds ?? this.ttlSeconds,
|
||||
ttlSeconds: ttlSeconds ?? this.cooldownSeconds,
|
||||
session: session ?? this.session,
|
||||
cooldownSeconds: clearCooldown ? null : cooldownSeconds ?? this.cooldownSeconds,
|
||||
cooldownUntil: clearCooldown ? null : cooldownUntil ?? this.cooldownUntil,
|
||||
idempotencyKey: idempotencyKey ?? this.idempotencyKey,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user