copyWith method
- @useResult
- @override
- String? authStrategy,
- String? token,
- DateTime? tokenExpiresAt = const $UndefinedDateTime(),
- Object? refreshToken = _Undefined,
- UuidValue? authUserId,
- Set<
String> ? scopeNames,
override
Returns a shallow copy of this AuthSuccess with some or all fields replaced by the given arguments.
Implementation
@useResult
@override
CookieAuthSuccess copyWith({
final String? authStrategy,
final String? token,
final DateTime? tokenExpiresAt = const $UndefinedDateTime(),
final Object? refreshToken = _Undefined,
final UuidValue? authUserId,
final Set<String>? scopeNames,
}) {
return CookieAuthSuccess(
AuthSuccess(
authStrategy: authStrategy ?? this.authStrategy,
token: token ?? this.token,
// Match the generated AuthSuccess.copyWith omission handling.
// ignore: invalid_use_of_internal_member
tokenExpiresAt: tokenExpiresAt is UndefinedSentinel
? this.tokenExpiresAt
: tokenExpiresAt,
refreshToken: refreshToken is String?
? refreshToken
: this.refreshToken,
authUserId: authUserId ?? this.authUserId,
scopeNames: scopeNames ?? this.scopeNames.map((final e0) => e0).toSet(),
),
maskToken: maskToken,
maskRefreshToken: maskRefreshToken,
);
}