BasicCredentialsExtractable class final

Extracts and decodes an Authorization: Basic base64(user:password) header.

Rejects with the Basic challenge rather than Bearer, which is what makes a browser show its own password prompt; answering the wrong one is why a 401 sometimes does nothing visible.

Implemented types

Constructors

BasicCredentialsExtractable({String realm = 'restricted'})
Reads basic credentials for realm.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
realm String
The realm a browser shows in its prompt.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

extract(Request request) Future<Result<BasicCredentials, 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