EnvelopeSigning mixin
Wraps payloads in signed JSON envelopes, and verifies envelopes created by other clients of the same or another atSign.
Envelopes are signed with this client's APKAM (PKAM) keypair — the keypair
whose public half ApkamSigning publishes at
public:_apsk.<enrollmentId>.a.__e@atsign — and carry the signer's
ApkamSigning.enrollmentId so that verifiers can fetch that key.
- Superclass constraints
- Mixin applications
- @experimental
Properties
- atClient → AtClient
-
no setterinherited
- enrollmentId → String
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → AtSignLogger
-
no setterinherited
- privateSigningKey → String
-
the private key used to sign things this application sends
no setterinherited
-
pubKeyCache
→ Map<
String, (String, Timer)> -
final
- publicKeyCacheSettings → ({Duration cacheExpiry, bool resetOnLookup})?
-
How to handle caching of public keys used for verification
final
- publicSigningKey → String
-
the public key which can be used to verify signatures made using
privateSigningKey
no setterinherited
- publicSigningKeyUri → String
-
the uri (e.g.
public:apsk.<enrollment_id>.__wa@atsign) of the publicSigningKeyno setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cachePubKey(
String atSign, String enrollmentId, String pubKey) → void -
getApkamPublicKey(
String atSign, String enrollmentId) → Future< String> -
Fetch the APKAM public signing key which
enrollmentIdofatSignhas published in its per-enrollment namespace. See ApkamSigning.publicSigningKeyUri. -
lookupPubKey(
String atSign, String enrollmentId) → String? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publishPublicSigningKey(
) → Future -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
verifyEnvelopeSignature(
Map envelope, {required String signerAtSign}) → Future< void> - Verify an envelope created by wrapAndSign or wrapAndSignAndJsonEncode.
-
wrapAndSign(
Object? payload, {Object? toEncodable(Object? nonEncodable)?}) → FutureOr< Map< String, Object?> > -
Create a json envelope around
payloadin a format that can be verified by verifyEnvelopeSignature. -
wrapAndSignAndJsonEncode(
Object? payload, {Object? toEncodable(Object? nonEncodable)?}) → FutureOr< String> - Same as wrapAndSign but we also call jsonEncode for you :)
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited