Documentation ¶
Index ¶
- func GeneratePKCEChallenge(verifier string) string
- func GeneratePKCEVerifier() string
- func GenerateState(length int) (string, error)
- func GetToken(ctx context.Context, config *OAuthConfig, usePKCE bool) (*oauth2.Token, error)
- func LoadTokenFromViper() (*oauth2.Token, error)
- func RefreshToken(ctx context.Context, config *oauth2.Config, token *oauth2.Token) (*oauth2.Token, error)
- func SaveTokenToViper(token *oauth2.Token) error
- type OAuthConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePKCEChallenge ¶ added in v0.0.80
func GeneratePKCEVerifier ¶ added in v0.0.80
func GeneratePKCEVerifier() string
func GenerateState ¶ added in v0.0.80
func LoadTokenFromViper ¶ added in v0.0.62
func RefreshToken ¶ added in v0.0.62
func SaveTokenToViper ¶ added in v0.0.62
Types ¶
type OAuthConfig ¶
type OAuthConfig struct { ClientId string ClientSecret string Endpoint oauth2.Endpoint Scopes []string RedirectURI string Port int }
func (*OAuthConfig) GetOAuthConfig ¶ added in v0.0.63
func (c *OAuthConfig) GetOAuthConfig() *oauth2.Config
Click to show internal directories.
Click to hide internal directories.