authhelper

package
v0.0.86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePKCEChallenge added in v0.0.80

func GeneratePKCEChallenge(verifier string) string

func GeneratePKCEVerifier added in v0.0.80

func GeneratePKCEVerifier() string

func GenerateState added in v0.0.80

func GenerateState(length int) (string, error)

func GetToken

func GetToken(ctx context.Context, config *OAuthConfig, usePKCE bool) (*oauth2.Token, error)

func LoadTokenFromViper added in v0.0.62

func LoadTokenFromViper() (*oauth2.Token, error)

func RefreshToken added in v0.0.62

func RefreshToken(ctx context.Context, config *oauth2.Config, token *oauth2.Token) (*oauth2.Token, error)

func SaveTokenToViper added in v0.0.62

func SaveTokenToViper(token *oauth2.Token) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL