AuthContextRecord with a masked token preview. Pass the returned auth_context_id in subsequent agent invocations instead of a raw token — the full token is never surfaced again.
Request Body
The DID of the subject who owns this credential (e.g.
"did:key:z6Mk...").The provider this credential is scoped to.
Describes how the credential is presented to the provider. The
mode field is required:mode | Additional fields | Description |
|---|---|---|
none | — | No authentication required. |
bearer_token | — | Credential is sent as a Bearer token. |
capability_token | — | Credential is a capability token. |
api_key_header | header_name (required) | Credential is sent in a custom HTTP header. |
The raw credential to encrypt and store. This value is never returned after registration.
Optional expiry timestamp for this credential. The node may reject invocations that reference an expired auth context.
Response
Returns201 Created with an AuthContextRecord.
The opaque identifier to pass as
auth_context_id in invocation requests.Internal reference to the encrypted secret in the secret broker. Not needed for invocations.
The DID of the subject who owns this auth context.
The provider this auth context is scoped to.
The auth model as registered.
A masked preview of the stored token (e.g.
"sk-...••••••"). The full token is never returned.UTC timestamp when this auth context was created.
Expiry timestamp for this auth context, if one was provided at registration.