SwampAuthenticationManager class final
Owns authentication state for active server connections.
This keeps connection lifecycle, authenticated identities, timeouts, and per-user connection limits separate from the main server implementation.
Constructors
- SwampAuthenticationManager(SwampAuthentication authentication)
-
Creates a manager for
authentication.
Properties
- authentication → SwampAuthentication
-
The authentication sources and policy managed by this instance.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- requiresAuthentication → bool
-
Whether connections must authenticate before sending normal commands.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
Channel channel, String token) → Future< AuthenticationAttemptResult> -
Authenticates
channelwithtokenand reserves its user connection. -
canCreateRooms(
Channel channel) → bool -
Whether
channelmay create a room under the configured policy. -
close(
) → Future< void> - Cancels pending timeouts, clears runtime state, and closes all sources.
-
connected(
Channel channel, AuthenticationRequest request, {required void onTimeout()}) → void - Registers the authentication context for a newly connected channel.
-
disconnected(
Channel channel) → void -
Releases all authentication state associated with
channel. -
isConnectionAuthorized(
Channel channel) → bool -
Whether
channelmay use commands that require an active connection. -
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