Documentation
¶
Index ¶
- func Authenticate(ctx context.Context, clientId string, redirectUrl string, authEndpoint string, ...) (*oauth2.Token, error)
- func CheckTokenExpiry(token *oauth2.Token) error
- func ClearTokens() error
- func LoadToken(provider string) (*oauth2.Token, error)
- func OpenBrowser(url string) error
- func SaveToken(token *oauth2.Token, provider string) error
- type AuthError
- type AuthResult
- type Client
- type ErrorCode
- type Token
- type TokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
func CheckTokenExpiry ¶ added in v0.2.1
func OpenBrowser ¶
Types ¶
type AuthError ¶
AuthError represents authentication-related errors
func NewAuthError ¶
func NewAuthErrorWithCause ¶
type AuthResult ¶
type TokenInfo ¶
type TokenInfo struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token,omitempty"`
IDToken string `json:"id_token,omitempty"`
TokenType string `json:"token_type"`
ExpiresAt time.Time `json:"expires_at"`
ExpiresIn int64 `json:"expires_in,omitempty"`
Scopes []string `json:"scopes"`
Provider string `json:"provider"`
}
Click to show internal directories.
Click to hide internal directories.