PublicKeyCredentialProvider class

A CredentialProvider that signs the connection nonce with an Ed25519 private key.

Implemented types

Constructors

PublicKeyCredentialProvider({required String principal, required SimpleKeyPair keyPair})
Creates a public-key provider over an existing keyPair.

Properties

hashCode int
The hash code for this object.
no setterinherited
keyPair → SimpleKeyPair
The Ed25519 key pair used to sign challenges.
final
principal String
The principal (login name) this provider authenticates as.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createAuthRequest(String nonce) Future<AuthRequest>
Builds an AuthRequest answering the challenge nonce.
override
identityPublicKeyBytes() Future<Uint8List?>
The raw public-key bytes that cryptographically bind this identity, used as the strongest input to the node UID. Returns null when the credential has no key (e.g. a bearer token), in which case the UID falls back to hardware and platform attributes alone.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicKeyBase64() Future<String>
The base64 (unpadded) public key, e.g. for an authorized_keys entry.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

generate(String principal) Future<PublicKeyCredentialProvider>
Generates a fresh key pair for principal.