ConnectanumHttpAuthClient class final

Dart IO client for Connectanum router HTTP auth bridge endpoints.

The router auth bridge exposes WAMP challenge/response authenticators over a JSON HTTP endpoint. This helper keeps that handshake in the public client package so protected router-hosted MCP routes can be used without reimplementing the token flow in each consumer application. Every complete issue, challenge, refresh, or revoke operation shares requestTimeout, and each response is limited to maxResponseBytes before UTF-8/JSON decoding.

Constructors

ConnectanumHttpAuthClient(Uri endpoint, {HttpClient? httpClient, Map<String, String> headers = const <String, String>{}, Duration requestTimeout = defaultRequestTimeout, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false})
ConnectanumHttpAuthClient.fromMcpBearerChallenge(Uri mcpEndpoint, McpBearerChallenge challenge, {HttpClient? httpClient, Map<String, String> headers = const <String, String>{}, Duration requestTimeout = defaultRequestTimeout, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false})
Creates an auth bridge client from a router-hosted MCP Bearer challenge.
factory

Properties

endpoint Uri
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
final
maxResponseBytes int
Maximum raw bytes accepted for each HTTP auth response.
final
requestTimeout Duration
One total deadline for a complete operation, including challenge work.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

authenticate({required String realm, required String authId, required AbstractAuthentication authentication, String? authMethod, Map<String, Object?> authextra = const <String, Object?>{}, Map<String, String> headers = const <String, String>{}}) Future<ConnectanumHttpAuthGrant>
close({bool force = false}) → void
issueScramToken({required String realm, required String authId, required String secret, Map<String, String> headers = const <String, String>{}}) Future<ConnectanumHttpAuthGrant>
issueTicketToken({required String realm, required String authId, required String ticket, Map<String, String> headers = const <String, String>{}}) Future<ConnectanumHttpAuthGrant>
issueWampCraToken({required String realm, required String authId, required String secret, Map<String, String> headers = const <String, String>{}}) Future<ConnectanumHttpAuthGrant>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshGrant(ConnectanumHttpAuthGrant grant, {Map<String, String> headers = const <String, String>{}}) Future<ConnectanumHttpAuthGrant>
Refreshes grant at its exact issuing endpoint while requiring the replacement authorization lineage to match it exactly.
refreshToken(String refreshToken, {Map<String, String> headers = const <String, String>{}}) Future<ConnectanumHttpAuthGrant>
revokeGrant(ConnectanumHttpAuthGrant grant, {ConnectanumHttpAuthTokenKind tokenKind = ConnectanumHttpAuthTokenKind.refreshToken, Map<String, String> headers = const <String, String>{}}) Future<void>
Revokes one credential from grant at its exact issuing endpoint.
revokeToken(String token, {String? tokenTypeHint, Map<String, String> headers = const <String, String>{}}) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited