ConnectanumHttpAuthGrant class final

Constructors

ConnectanumHttpAuthGrant({required String accessToken, required String tokenType, Uri? authEndpoint, String? refreshToken, String? realm, String? authId, String? authRole, String? authMethod, String? authProvider, Duration? accessTokenExpiresIn, Duration? refreshTokenExpiresIn, DateTime? issuedAt, Map<String, Object?> details = const <String, Object?>{}})
const
ConnectanumHttpAuthGrant.fromJson(Map<String, Object?> json, {Uri? authEndpoint, DateTime? now})
Parses one live router HTTP-auth response.
factory
ConnectanumHttpAuthGrant.fromStateJson(Map<String, Object?> json, {required Uri expectedAuthEndpoint, Uri? expectedMcpEndpoint, DateTime? now})
Restores a versioned grant state document while pinning its issuer.
factory

Properties

accessToken String
final
accessTokenExpiresAt DateTime?
Absolute access-token expiry derived from issuedAt.
no setter
accessTokenExpiresIn Duration?
final
authEndpoint Uri?
Exact HTTP-auth endpoint that issued this grant when known.
final
authId String?
final
authMethod String?
final
authProvider String?
final
authRole String?
final
details Map<String, Object?>
final
hashCode int
The hash code for this object.
no setterinherited
issuedAt DateTime?
Time at which the router response was accepted when known.
final
realm String?
final
refreshToken String?
final
refreshTokenExpiresAt DateTime?
Absolute refresh-token expiry derived from issuedAt.
no setter
refreshTokenExpiresIn Duration?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenType String
final

Methods

isAccessTokenExpired({DateTime? now}) bool
Whether the advertised access-token lifetime has elapsed.
isForAuthEndpoint(Uri candidate) bool
Whether this grant was issued by candidate.
isForMcpEndpoint(Uri candidate) bool
Whether this grant's issuing auth endpoint shares candidate's HTTP origin.
isRefreshTokenExpired({DateTime? now}) bool
Whether the advertised refresh-token lifetime has elapsed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toStateJson() Map<String, Object?>
Returns a versioned JSON state document for durable caller-owned storage.
toString() String
A string representation of this object.
inherited

Operators

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