copyWith method
Create a copy with updated values
Implementation
AuthorizationData copyWith({
String? userId,
List<String>? roles,
List<String>? permissions,
Map<String, dynamic>? attributes,
DateTime? expiresAt,
String? resource,
String? action,
}) {
return AuthorizationData(
userId: userId ?? this.userId,
roles: roles ?? this.roles,
permissions: permissions ?? this.permissions,
attributes: attributes ?? this.attributes,
expiresAt: expiresAt ?? this.expiresAt,
resource: resource ?? this.resource,
action: action ?? this.action,
);
}