BearerTokenValidator typedef
Callback function for validating bearer tokens. Returns true if the token is valid, false otherwise.
The validator can be synchronous or asynchronous, allowing for:
- Simple token comparison
- JWT verification
- Database lookups
- API calls to authentication services
Implementation
typedef BearerTokenValidator = FutureOr<bool> Function(String token);