copyWith method
AuthMiddlewareConfig
copyWith({
- AuthType? authType,
- AuthManager? authManager,
- String? guard,
- String? realm,
- String? apiKeyHeader,
- Future<
Authenticatable?> customAuthenticator()?, - List<
String> ? roles, - List<
String> ? permissions, - bool? cacheUser,
- MiddlewarePriority? priority,
- String? name,
Implementation
AuthMiddlewareConfig copyWith({
AuthType? authType,
AuthManager? authManager,
String? guard,
String? realm,
String? apiKeyHeader,
Future<Authenticatable?> Function(Request)? customAuthenticator,
List<String>? roles,
List<String>? permissions,
bool? cacheUser,
MiddlewarePriority? priority,
String? name,
}) {
return AuthMiddlewareConfig(
authType: authType ?? this.authType,
authManager: authManager ?? this.authManager,
guard: guard ?? this.guard,
realm: realm ?? this.realm,
apiKeyHeader: apiKeyHeader ?? this.apiKeyHeader,
customAuthenticator: customAuthenticator ?? this.customAuthenticator,
roles: roles ?? this.roles,
permissions: permissions ?? this.permissions,
cacheUser: cacheUser ?? this.cacheUser,
priority: priority ?? this.priority,
name: name ?? this.name,
);
}