BuiltInMiddleware class
Built-in middleware creators for common use cases.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
apiKey(
{required String validKey}) → Middleware Function() - Creates API key authentication middleware.
-
jwt(
{required String secret, String? issuer, List< String> requiredRoles = const []}) → Middleware Function() - Creates JWT authentication middleware.
-
rateLimit(
{required int maxRequests, required Duration window}) → Middleware Function() - Creates endpoint-specific rate limiting middleware.