RestApiAuthenticationSource class final
Authentication source that validates credentials using a REST endpoint.
It sends a JSON POST body containing token, requestUri, and
remoteAddress. A successful response must contain userId (or id) and
may contain canCreateRooms (or canCreate). A 401 or 403 response means
that the credentials are invalid; other non-success responses are treated
as source failures.
- Inheritance
-
- Object
- AuthenticationSource
- RestApiAuthenticationSource
Constructors
- RestApiAuthenticationSource(Uri endpoint, {Duration timeout = const Duration(seconds: 10), HttpClient? client})
Properties
Methods
-
authenticate(
AuthenticationRequest request) → Future< AuthenticatedUser?> -
override
-
close(
) → Future< void> -
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