oauth2

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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