Skip to main content

Authentication

ebsi auth token --scope <scope> [--vc <file>] [--save]

Obtains an access token with the OpenID4VP DCQL vp_token grant flow. A secp256k1 key is required.

OptionDescription
--scope <scope>Required. A scope, or several space-separated combinable scopes, for example "did-registry:write issuers-registry:write"
--vc <file>Path to a VC JWT file. Required for scopes that need a VC
--saveSave the token to the config file (same as ebsi config set token <jwt>)

The key and DID options of the global options also apply.

ScopeVC requiredCombinableDescription
did-registry:writeNoYesWrite to the DID Registry
issuers-registry:writeNoYesWrite to the Issuers Registry
policies-registry:writeNoYesWrite to the Policies Registry
schemas-registry:writeNoYesWrite to the Schemas Registry
timestamp:writeNoYesWrite timestamps
track-and-trace:createNoYesCreate Track and Trace documents
track-and-trace:writeNoYesWrite to Track and Trace
did-registry:inviteYesNoOnboard a new DID by invitation
ledger:invokeYesNoInvoke the Ledger service directly
issuers-registry:inviteYesNoInvite an issuer to the registry
track-and-trace:authoriseYesNoGrant Track and Trace access

For scopes that need no VC, the CLI mints and presents a self-issued SelfAttestation credential. Scopes that need a VC can only be requested alone.

Instance targeting. Any scope can be suffixed with :<0x-address>, for example track-and-trace:write:0x61c36a8d610163660E21a8b7359e1Cac0C9133e1, to target a specific deployed instance of that registry instead of the default one. The address is 0x followed by 40 hexadecimal characters, with a valid EIP-55 checksum if it is mixed-case.

Key binding for did-registry:invite. The VerifiableAuthorisationToOnboard VC must carry the thumbprint of the target key in credentialSubject.jwkThumbprint. Run ebsi wallet info to get it and give it to the issuer. The CLI checks it locally first.

# Token for a write scope
ebsi auth token --scope did-registry:write --save

# One token for two registries
ebsi auth token --scope "did-registry:write issuers-registry:write" --save

# Token for an invite scope, with a VC
ebsi auth token --scope did-registry:invite --vc ./my-credential.jwt