BearerTokenExtractable class final
Extracts the token from an Authorization: Bearer <token> header.
Every bearer scheme starts by stripping that prefix and answering 401 with the right challenge when it is missing. Doing it once means a custom extractor starts from the token rather than from the header.
- Implemented types
Constructors
- BearerTokenExtractable({String challenge = 'Bearer'})
-
Reads a bearer token.
const
Properties
Methods
-
extract(
Request request) → Future< Result< String, Rejection> > -
Produces the value, or the rejection that stops the handler.
override
-
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