feat/interactive-auth #9

Merged
Joren merged 2 commits from feat/interactive-auth into main 2026-06-19 21:19:59 +02:00
Owner
No description provided.
Joren added 2 commits 2026-06-19 21:19:33 +02:00
- Add APIToken field to Credentials struct with omitempty JSON tag
- Implement GetAPIToken() method with persistent token storage
- Add SaveRefreshToken() helper to preserve API tokens during OAuth
- Implement --api CLI flag to use API token instead of OAuth
- Validate empty refresh tokens and skip refresh if invalid
- Update README with API token usage documentation
- Add GetToken() as unified auth entry point with method selection
- Prompt [1] OAuth / [2] API token on first launch, save choice
- Validate API tokens against /api/v1/users/self before saving
- Check saved API token validity on reuse; fallback to re-prompt on failure
- Add HTTP status check to GetCourseInfo and GetEnrolledCourses
- Remove --api flag, auth method is now persistent and interactive
Joren merged commit 4978d84196 into main 2026-06-19 21:19:59 +02:00
Joren deleted branch feat/interactive-auth 2026-06-19 21:20:01 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Joren/CanvasArchiver#9