feat: add --api flag for Canvas API token authentication
- 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
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package models
|
||||
|
||||
type Credentials struct {
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
RefreshToken string `json:"refresh_token,omitempty"`
|
||||
APIToken string `json:"api_token,omitempty"`
|
||||
}
|
||||
|
||||
type TokenResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user