JWTEndpoint class
Anotación para validación a nivel de endpoint específico
Sobrescribe la validación del controlador si existe. Permite validaciones específicas por endpoint.
Ejemplo:
@POST('/transactions')
@JWTEndpoint([
MyFinancialValidator(minimumAmount: 10000),
MyDepartmentValidator(allowedDepartments: ['finance']),
], requireAll: true)
Future<Response> createTransaction(Request request) async {
// Este endpoint requiere validación financiera específica
}
Constructors
-
JWTEndpoint.new(List<
JWTValidatorBase> validators, {bool requireAll = true}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- requireAll → bool
-
Si es true, TODOS los validadores deben pasar (AND logic)
Si es false, al menos UNO debe pasar (OR logic)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
validators
→ List<
JWTValidatorBase> -
Lista de validadores que se ejecutarán
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited