TenantHostValidator class
Security guard that validates incoming HTTP Host headers against trusted tenant domains.
Constructors
-
TenantHostValidator({required List<
TenantContext> tenants, List<String> allowedRootDomains = const []}) -
const
Properties
-
allowedRootDomains
→ List<
String> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tenants
→ List<
TenantContext> -
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
String hostHeader) → TenantContext -
Validates
hostHeaderagainst registered tenants. Returns the matched TenantContext if authorized, or throws HostValidationException if invalid.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited