BasicAuthAuthenticator class
Authenticates Authorization: Basic base64(user:pass) requests.
A missing Authorization header (or a non-Basic scheme) yields anonymous
(null); a Basic header with wrong credentials throws
UnauthorizedException.
- Implemented types
Constructors
-
BasicAuthAuthenticator(Map<
String, String> credentials, {Set<String> roles(String username)?}) -
Authenticates against a fixed
credentialsmap (username → password). The resulting principal is granted the roles fromroles(if provided). - BasicAuthAuthenticator.resolver(BasicResolver resolver)
-
Authenticates by delegating validation to
resolver.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
HubRequest request) → Future< Principal?> -
Authenticates
request. See the class contract for the return/throw semantics.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