pub struct NhiClaims {Show 14 fields
pub sub: String,
pub iss: String,
pub aud: Audience,
pub iat: u64,
pub nbf: Option<u64>,
pub exp: u64,
pub jti: String,
pub azp: Option<String>,
pub act: Option<ActorClaim>,
pub instance_uid: String,
pub charter: String,
pub version: String,
pub scopes: Vec<String>,
pub parent_token: Option<String>,
}Expand description
Claims carried by an AgentVisor AI NHI token.
Standard claims (sub, iss, aud, iat, nbf, exp, jti) plus the
agent identity block and scopes. parent_token embeds the parent’s full
JWT for delegation-chain verification.
RFC 8693 additions: azp (authorized party — the client that obtained the
token) and act (actor — the agent acting on behalf of sub).
Fields§
§sub: StringSubject: the human principal (e.g. user:alice@corp.com). Under
RFC 8693 semantics, sub stays the human and agent identity
moves to act.sub.
iss: StringIssuer (corporate IdP or the harness’s own token service).
aud: AudienceAudience (the harness deployment id). RFC 7519 §4.1.3 allows either a single string or an array of strings; both are accepted here so mainstream IdPs (Okta, Auth0, Azure AD, Cognito) that emit multi-audience tokens are compatible.
iat: u64Issued-at, epoch seconds.
nbf: Option<u64>Not-before, epoch seconds.
exp: u64Expiry, epoch seconds. exp - iat must be ≤ MAX_TTL_SECS.
jti: StringUnique token id (revocation hook).
azp: Option<String>Authorized party (RFC 7519): the OAuth 2.0 client_id that obtained this token. Used in token-exchange flows to track which client requested the exchange.
act: Option<ActorClaim>RFC 8693 actor claim. When present, sub identifies the human
principal and act.sub identifies the agent acting on their behalf.
Nested act.act represents further delegation hops.
instance_uid: StringAgent instance uid bound into every emitted event.
charter: StringAgent charter.
version: StringAgent version.
scopes: Vec<String>Granted scopes, e.g. tool:db_write, payout.
parent_token: Option<String>Parent agent’s full JWT (delegation). None for root tokens.