Skip to content

feat: use generated client for subscription APIs#3

Merged
tiankaima merged 10 commits into
mainfrom
feat/api-consistency
Jun 30, 2026
Merged

feat: use generated client for subscription APIs#3
tiankaima merged 10 commits into
mainfrom
feat/api-consistency

Conversation

@tiankaima

Copy link
Copy Markdown
Member

Summary

Verification

  • make check-openapi-sync
  • go test ./...
  • go build ./...

Depends on Life-USTC/server#320 for the new generated subscription endpoints.

tiankaima added 10 commits June 21, 2026 20:54
- Preserve computed audience fallback in verifiedTokenToCredential on refresh.
- Remove dead code: credentialFromTokens, requiredString, strDefault, jsonValid.
- Reject empty issuer/audience in ValidateIDToken instead of skipping checks.
- Use strconv.ParseInt in parseIntString.
- Trim server consistently in RefreshToken and document resource refresh regression.
…d_token for openid scope

- Pass registered clientID (not server URL) as audience to ValidateIDToken in Login, RefreshToken, and LoginDeviceCode.

- Keep Credential.Resource as the server URL/resource indicator; verifiedTokenToCredential now accepts resource separately.

- Return an error when openid scope was requested but the token response lacks id_token.

- Add nil guard for VerifiedToken in verifiedTokenToCredential.

- Document ExpiresAt - 1h heuristic in RefreshToken.

- Add unit tests for audience validation, nil guard, and missing id_token.
- todo done: call PATCH /api/todos/batch instead of looping single updates
- homework done: call PUT /api/homeworks/completions instead of looping
- comment delete: call DELETE /api/comments/batch instead of looping
- calendar: add import-codes command using POST /api/calendar-subscriptions/import-codes
- preserve interactive single-pick flows and per-item success reporting
- report partial batch failures as a single returned error

Task: 17
@tiankaima
tiankaima merged commit 7330d50 into main Jun 30, 2026
2 checks passed
@tiankaima
tiankaima deleted the feat/api-consistency branch June 30, 2026 15:30
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.

1 participant