Secret class

A named secret, scoped to an application namespace.

The namespace is the unit of authorization: a secret tagged myapp is only ever shared with (and only ever deliverable to) enrollments authorized for myapp — see SecretStore.namespaceAuthorizes and the envelope key shape in PairwiseSecretSharing.

version is a monotonic ordering counter for rotations of the same logical secret: when set, SecretStore.putIfNewer orders on it (higher wins) so the merge is deterministic regardless of any client's wall clock. createdAt is only a tiebreak. Leave version null for secrets that are never rotated.

Annotations
  • @experimental

Constructors

Secret({required String namespace, required String name, required String value, int? version, DateTime? createdAt})

Properties

createdAt DateTime
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
namespace String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
final
version int?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Object? json) Secret