Authorization class final

An Authorization header, split where the specification splits it.

The header is <scheme> <credentials>, and the scheme is compared case-insensitively — a client sending bearer rather than Bearer is conforming, and an extractor that misses it is not.

Constructors

Authorization(String scheme, String credentials)
Pairs a scheme with its credentials.
const

Properties

credentials String
Everything after the scheme.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme String
The scheme, lower-cased: bearer, basic, digest.
final

Methods

isScheme(String name) bool
Whether this header uses name, which is matched case-insensitively.
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

Static Methods

of(Request request) Authorization?
Reads the header of request, or null when there is none.