StoredSession class
A persisted login to a single Hub.
Records how the user authenticates (method is token or publicKey) plus
the optional CA path remembered from --ca, so later commands to the same
Hub need no credential flags. For key auth only the keyPath is stored — the
Ed25519 seed itself stays in the file the user manages.
Constructors
- StoredSession({required String principal, required String method, String? token, String? keyPath, String? ca, bool insecureSkipVerify = false})
-
const
-
StoredSession.fromJson(Map<
String, dynamic> json) -
factory
- StoredSession.publicKey({required String principal, required String keyPath, String? ca, bool insecureSkipVerify = false})
-
Creates a public-key session referencing the seed file at
keyPath. - StoredSession.token({required String principal, required String token, String? ca, bool insecureSkipVerify = false})
- Creates a token session.
Properties
- ca → String?
-
Path to the Hub CA/cert PEM to trust, remembered from
--ca(optional).final - hashCode → int
-
The hash code for this object.
no setterinherited
- insecureSkipVerify → bool
-
Whether commands reusing this session should skip TLS certificate/hostname
verification, remembered from
--insecure-skip-verifyat login time.final - keyPath → String?
-
Absolute path to the base64 Ed25519 seed file, when method is
publicKey.final - method → String
-
The authentication method:
tokenorpublicKey.final - principal → String
-
The principal (login name) this session authenticates as.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → String?
-
The bearer token, when method is
token.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCredentialProvider(
) → Future< CredentialProvider> - Rebuilds the CredentialProvider this session describes.
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited