Documentation ¶
Overview ¶
Package auth provides the authentication logic for the application
Index ¶
- type AuthToken
- func (t *AuthToken) IsExpired() bool
- func (t *AuthToken) Load(decoder *yaml.Decoder) error
- func (t *AuthToken) Refresh(ctx context.Context, config *oauth2.Config, credentialFilePath string) error
- func (t *AuthToken) Save(encoder *yaml.Encoder) error
- func (t *AuthToken) SetAuthHeader(r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthToken ¶
type AuthToken struct { AccessToken string `yaml:"access_token"` RefreshToken string `yaml:"refresh_token"` TokenType string `yaml:"token_type"` Expiry time.Time `yaml:"expiry"` }
func NewAuthToken ¶
func StartOAuthFlow ¶
func StartOAuthFlow( ctx context.Context, oauthConf oauth2.Config, redirectPort, redirectPath, credentialFilePath string, ) (*AuthToken, error)
StartOAuthFlow starts the OAuth flow
func (*AuthToken) SetAuthHeader ¶
Click to show internal directories.
Click to hide internal directories.