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({
String? authStrategy,
String? token,
DateTime? tokenExpiresAt = const $UndefinedDateTime(),
Object? refreshToken = _Undefined,
UuidValue? authUserId,
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((e0) => e0).toSet(),
),
maskToken: maskToken,
maskRefreshToken: maskRefreshToken,
);
}