MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get_token

Function get_token

atomic-cli/src/commands/token.rs:69–71  ·  view source on GitHub ↗

Mint a fresh, short-lived self-signed EdDSA JWT for `identity` against `server`. `server` is the bare server URL (e.g. `https://atomic.storage`), NOT an org subdomain. The token is keyed by the identity's own Ed25519 public key, so no prior registration state needs to be on file locally to mint it.

(server: &str, identity: &Identity)

Source from the content-addressed store, hash-verified

67/// subdomain. The token is keyed by the identity's own Ed25519 public key, so
68/// no prior registration state needs to be on file locally to mint it.
69pub async fn get_token(server: &str, identity: &Identity) -> CliResult<String> {
70 mint_token(server, identity)
71}
72
73/// Mint a fresh token. Tokens are not cached, so this is identical to
74/// [`get_token`]; kept for call-site compatibility (e.g. retry-after-401).

Callers 2

attach_identityFunction · 0.85
build_client_with_orgFunction · 0.85

Calls 1

mint_tokenFunction · 0.85

Tested by

no test coverage detected