Authenticator class abstract interface

Establishes the Principal behind a request.

Contract:

  • no credentials present → return null (the caller is anonymous);
  • credentials present but invalid → throw UnauthorizedException (fail-closed);
  • credentials present and valid → return the Principal.

The hub runs the authenticator early in the pipeline and attaches the result to HubRequest.principal, so auth-dependent routing and authorization see it.

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.
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