oauth2

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCodeChallenge added in v1.46.0

func GenerateCodeChallenge() string

func GenerateCodeVerifier added in v1.46.0

func GenerateCodeVerifier() string

func RefreshToken

func RefreshToken(hostname string, cfg config.Config, protocol string) error

func StartFlow

func StartFlow(cfg config.Config, io *iostreams.IOStreams, hostname string) (string, error)

Types

type AuthToken

type AuthToken struct {
	AccessToken  string    `json:"access_token"`
	RefreshToken string    `json:"refresh_token"`
	ExpiresIn    int       `json:"expires_in"`
	ExpiryDate   time.Time `json:"expires_date"`
	CodeVerifier string    `json:"code_verifier"`
}

func (*AuthToken) CalcExpiresDate

func (t *AuthToken) CalcExpiresDate()

func (*AuthToken) SetConfig

func (token *AuthToken) SetConfig(hostname string, cfg config.Config) error

Jump to

Keyboard shortcuts

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