copyWith method

AuthMiddlewareConfig copyWith({
  1. AuthType? authType,
  2. AuthManager? authManager,
  3. String? guard,
  4. String? realm,
  5. String? apiKeyHeader,
  6. Future<Authenticatable?> customAuthenticator(
    1. Request
    )?,
  7. List<String>? roles,
  8. List<String>? permissions,
  9. bool? cacheUser,
  10. MiddlewarePriority? priority,
  11. 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,
  );
}