Skip to content

Commit cdbb2bc

Browse files
committed
docs(cli): whoami --json — populated user field + tokenType
deployng#3166 (account.me procedure) merged and deploy-cli will consume it via the follow-up PR. Update the documented schema so the user field shows populated values and add tokenType.
1 parent 0a1fc7a commit cdbb2bc

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

runtime/reference/cli/deploy.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,16 +691,25 @@ removed without a version bump.
691691
```json
692692
{
693693
"authenticated": true,
694-
"user": null,
694+
"user": {
695+
"id": "...",
696+
"name": "Ada Lovelace",
697+
"email": "[email protected]",
698+
"avatarUrl": "https://...",
699+
"githubLogin": "ada"
700+
},
701+
"tokenType": "user",
695702
"orgs": [
696703
{ "id": "...", "slug": "myorg", "name": "My Org", "plan": "pro" }
697704
]
698705
}
699706
```
700707

701-
`user` is currently `null`; future backend support will populate it with
702-
`{ id, name, email, ... }`. Agents reading `authenticated` / `orgs[]` will keep
703-
working.
708+
For user-backed tokens (web sessions, `dop_` device tokens) `user` is
709+
populated with `id`, `name`, `email`, `avatarUrl`, `githubLogin`. For
710+
organization-scoped (`ddo_`) tokens, `user` is `null` and `tokenType`
711+
identifies the token kind so the caller can fall back to `orgs[]`. Any
712+
of the inner string fields may be `null` if the backend has no value.
704713

705714
#### `deno deploy orgs list --json`
706715

0 commit comments

Comments
 (0)