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

Constructors

RestApiAuthenticationSource(Uri endpoint, {Duration timeout = const Duration(seconds: 10), HttpClient? client})

Properties

endpoint → Uri
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → Duration
final

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