Commit 60a0c2f
feat(whoami): consume account.me to populate user identity (#101)
The deployng `account.me` tRPC procedure has landed, so `deno deploy
whoami` can now identify the principal behind the token rather than
just listing reachable orgs.
- Calls `account.me` in parallel with `orgs.list` (no extra round
trip).
- JSON output: `user` field is now populated for user-backed tokens
(`{ id, name, email, avatarUrl, githubLogin }`) and `null` for
org-scoped (`ddo_`) tokens. A new `tokenType` field carries the
raw token type from the backend in both cases.
- Human output: the "Authenticated" line now names the principal
(`@github-login`, falling back to email/name/id, or
`org-scoped token (...)` for non-user tokens).
Existing agent consumers reading `authenticated` and `orgs[]` keep
working; only added fields.
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>1 parent 8dfef34 commit 60a0c2f
1 file changed
Lines changed: 25 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
249 | 260 | | |
250 | 261 | | |
251 | 262 | | |
| |||
260 | 271 | | |
261 | 272 | | |
262 | 273 | | |
263 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
264 | 278 | | |
265 | 279 | | |
266 | 280 | | |
267 | 281 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 282 | + | |
| 283 | + | |
273 | 284 | | |
274 | 285 | | |
275 | 286 | | |
| |||
280 | 291 | | |
281 | 292 | | |
282 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
283 | 299 | | |
284 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
285 | 303 | | |
286 | 304 | | |
287 | 305 | | |
| |||
0 commit comments