Claims class

A CWT claims set with typed accessors for standard CWT (RFC 8392) and EAT (RFC 9711) claims.

Standard claims are exposed as typed properties. Custom or application- specific claims can be accessed via operator[] using their integer key.

Constructors

Claims()
Creates an empty claims set.

Properties

audience String?
Audience: identifies the recipients the token is intended for (key 3).
getter/setter pair
bootCount int?
BootCount: number of times the device has booted (key 267).
getter/setter pair
bootSeed Uint8List?
BootSeed: random value unique to the current boot cycle (key 268).
getter/setter pair
debugStatus DebugState?
DebugStatus: debug port state (key 263).
getter/setter pair
expiration int?
Expiration: the time on or after which the token must not be accepted (key 4, Unix timestamp in seconds).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hwModel Uint8List?
HwModel: product or board model identifier (key 259).
getter/setter pair
hwVersion String?
HwVersion: hardware revision identifier (key 260). Stored as a 1-element CBOR array per RFC 9711 Section 4.2.5.
getter/setter pair
intendedUse IntendedUse?
IntendedUse: the token's purpose (key 275).
getter/setter pair
issuedAt int?
IssuedAt: the time at which the token was issued (key 6, Unix timestamp in seconds).
getter/setter pair
issuer String?
Issuer: identifies the principal that issued the token (key 1).
getter/setter pair
notBefore int?
NotBefore: the time before which the token must not be accepted (key 5, Unix timestamp in seconds).
getter/setter pair
oemBoot bool?
OemBoot: whether the boot chain is OEM-authorized (key 262).
getter/setter pair
oemid Object?
OEMID: hardware manufacturer identifier (key 258).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subject String?
Subject: identifies the principal that is the subject of the token (key 2).
getter/setter pair
swName String?
SwName: name of the firmware or software (key 270).
getter/setter pair
swVersion String?
SwVersion: software version identifier (key 271). Stored as a 1-element CBOR array per RFC 9711 Section 4.2.7.
getter/setter pair
tokenId Uint8List?
TokenID: a unique identifier for the token (key 7).
getter/setter pair
ueid Uint8List?
UEID: a globally unique device identifier (key 256).
getter/setter pair
uptime int?
Uptime: seconds since last boot (key 261).
getter/setter pair

Methods

getConfirmXdsa() PublicKey?
Extracts the bound xDSA public key from the Confirm claim, or null if absent or a different key type.
getConfirmXhpke() PublicKey?
Extracts the bound xHPKE public key from the Confirm claim, or null if absent or a different key type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setConfirmXdsa(PublicKey key) → void
Sets the Confirm claim to bind an xDSA public key to this token.
setConfirmXhpke(PublicKey key) → void
Sets the Confirm claim to bind an xHPKE public key to this token.
setOemidIeee(Uint8List id) → void
Sets OEMID to a 3-byte IEEE OUI/MA-L.
setOemidPen(int pen) → void
Sets OEMID to an IANA Private Enterprise Number.
setOemidRandom(Uint8List id) → void
Sets OEMID to a 16-byte random manufacturer identifier.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int key) Object?
Gets a custom claim by its integer key.
operator []=(int key, Object? value) → void
Sets a custom claim by its integer key.