Repository navigation
feat(auth): model the connections resource (list + disconnect, delegated user_id) - #81
Merged
Merged
Conversation
auth.connections.list(user_id=None) and auth.connections[provider] [.integration].delete(user_id=None) cover GET/DELETE /auth/v1/connections/...; campus-profile currently hand-builds these paths over the raw client. Metadata-only surface (no token values); 404 on disconnect surfaces as NotFoundError so callers can treat it as idempotent. user_id travels as a query param for delegated (basic-auth) calls, matching the server's _resolve_target_user. Fixes #71
nycomp
force-pushed
the
feat/auth-connections
branch
from
October 4, 2026 01:47
3d8c07f to
d951fec
Compare
This was referenced Oct 4, 2026
ngjunsiang
added this pull request to stack #86
October 4, 2026 03:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
auth.connectionsresource covering the/auth/v1/connections/surface (campus/auth/routes/connections.py, campusweekly@ 24adffc):connections.list(user_id=None)→ GET collection, returns theconnectionsmetadata list ({provider, integration, scopes, connected_at, expires_at} — token values never appear)connections[provider].delete(user_id=None)→ DELETE/connections/<provider>/connections[provider][integration].delete(user_id=None)→ DELETE/connections/<provider>/<integration>/(e.g.google/classroom)user_idis sent as a query parameter when given (the delegated basic-auth form; ignored by the server under a bearer token). 404 on disconnect surfaces asNotFoundErrorviaraise_for_status, so callers can treat disconnect as idempotent — campus-profile already does.strict_slashes).Replaces campus-profile's hand-built
client.auth.client.get/delete(...)calls (integrations.py:64-158). Pairs with #56 (integrations registry).Tests
tests/unit/test_connections.py— 6 contract tests pinning collection/list paths, delegateduser_idquery on all three routes, and the trailing slashes. Full suite: 152 passed.Fixes #71