NodeConnectionAuthenticator class
Authenticates a node's control connection with OmnyServer's in-band challenge/response, before omnyhub's node protocol takes over.
Runs the exchange the Hub has always run — hello → auth.challenge →
auth.submit → auth.ok/auth.fail — but as an omnyhub
omnyhub.ConnectionAuthenticator, so the hub owns the socket, the routing
and the close codes. The credential verification itself is untouched:
authenticator is the same Authenticator (token or Ed25519 public key)
that the Hub used before.
Throwing rejects the connection: omnyhub closes it with the WebSocket code echoing the failure, and the node never registers.
Constructors
- NodeConnectionAuthenticator({required Authenticator authenticator, ChallengeMinter? challenges, AuthAuditSink? onRejected, Duration timeout = const Duration(seconds: 10)})
- Creates a connection authenticator.
Properties
- authenticator → Authenticator
-
Verifies the presented credential.
final
- challenges → ChallengeMinter
-
Mints the per-connection challenge nonce.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onRejected → AuthAuditSink?
-
Records rejected attempts, if the Hub audits them.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
How long each handshake step may take.
final
Methods
-
authenticate(
HandshakeConnection connection, HubRequest request) → Future< Principal?> -
Runs the in-band handshake over
connectionfor the upgraderequest. -
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