Auth.bearer constructor

Auth.bearer(
  1. AuthValidator validator
)

Creates an instance of Auth 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

Auth.bearer(AuthValidator validator)
    : this(validator,
    parser: const AuthorizationBearerParser());