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.
| Option | Description |
|---|---|
--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 |
--save | Save the token to the config file (same as ebsi config set token <jwt>) |
The key and DID options of the global options also apply.
| Scope | VC required | Combinable | Description |
|---|---|---|---|
did-registry:write | No | Yes | Write to the DID Registry |
issuers-registry:write | No | Yes | Write to the Issuers Registry |
policies-registry:write | No | Yes | Write to the Policies Registry |
schemas-registry:write | No | Yes | Write to the Schemas Registry |
timestamp:write | No | Yes | Write timestamps |
track-and-trace:create | No | Yes | Create Track and Trace documents |
track-and-trace:write | No | Yes | Write to Track and Trace |
did-registry:invite | Yes | No | Onboard a new DID by invitation |
ledger:invoke | Yes | No | Invoke the Ledger service directly |
issuers-registry:invite | Yes | No | Invite an issuer to the registry |
track-and-trace:authorise | Yes | No | Grant 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