Skip to content

Surface redirect_uris and is_public in client list/get output - #23

Merged
nycomp merged 1 commit into
mainfrom
feat/client-redirect-uris-output
Oct 1, 2026
Merged

nycomp merged 1 commit into
mainfrom
feat/client-redirect-uris-output

Conversation

@nycomp

@nycomp nycomp commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #21

What

_format_client() projected only id, name, description, created_at, permissions, so campus client list --json and campus client get --json silently dropped redirect_uris and is_public. Both fields are now projected, and table mode shows them too.

  • JSON: adds "redirect_uris": client.redirect_uris or [] (null coerced to []) and "is_public": client.is_public to the projection used by client list/get/new/update --json.
  • Table mode: prints a Redirect URIs: block (one URI per line, (none) when empty) and a Public client: yes|no line — indented under each client in client list, appended after Permissions in client get/new/update details. Existing lines are unchanged.

Why

redirect_uri registration is now operational: campus will enforce exact-match redirect_uri validation at /authorize (RFC 6749 §3.1.2.2). An admin surveying "which clients have no redirect_uris registered?" was getting a wrong answer from the CLI and had to fall back to the Python API.

Tests

  • Unit: projection includes both fields; null redirect_uris coerces to [].
  • Integration: client get/list/update --json payloads expose the fields; table mode renders the URI block and public flag.
  • Fixed a latent fixture gotcha: Mock(name=...) names the mock rather than setting the attribute, which broke JSON serialization once client get --json gained a test.
  • Suite: 106 passed, ruff clean (hooks run manually against the main checkout's venv — worktree has no .venv).

_format_client() projected only id/name/description/created_at/
permissions, so client list/get --json silently dropped redirect_uris
and is_public — forcing admins off the CLI during redirect_uri
registration surveys (campus will enforce exact-match redirect_uri
validation at /authorize, RFC 6749 §3.1.2.2).

Both fields are now projected (null redirect_uris coerced to []), and
table mode prints each redirect URI plus a public-client flag line.

Fixes #21
@nycomp
nycomp merged commit f9f261f into main Oct 1, 2026
1 check passed
@nycomp
nycomp deleted the feat/client-redirect-uris-output branch October 1, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client list/get output omits redirect_uris and is_public

2 participants