Authorizer.bearer constructor
Authorizer.bearer(
- AuthValidator? validator, {
- List<
String> ? scopes,
Creates an instance of Authorizer with Bearer token parsing.
Parses a bearer token from the request's Authorization header, e.g.
Authorization: Bearer ap9ijlarlkz8jIOa9laweo
If scopes
is provided, the bearer token must have access to all scopes according to validator
.
Implementation
Authorizer.bearer(AuthValidator? validator, {List<String>? scopes})
: this(
validator,
parser: const AuthorizationBearerParser(),
scopes: scopes,
);