authorize

package
v0.7.2-beta.7 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidToken

func IsValidToken(tokenString string) bool

IsValidToken checks to see if the token is valid and has not expired

Types

type CachedTokenProvider

type CachedTokenProvider interface {
	GetTokens() (*authenticator.TokenResponse, error)
	// contains filtered or unexported methods
}

type CloudIssuedTokenProvider

type CloudIssuedTokenProvider struct {
	Options
	Authenticator authenticator.Authenticator
}

type FileCached

type FileCached struct {
	// contains filtered or unexported fields
}

type IssuedTokenProvider

type IssuedTokenProvider interface {
	// contains filtered or unexported methods
}

type KeyringCached

type KeyringCached struct {
	// contains filtered or unexported fields
}

type KeyringCachedTokenProvider

type KeyringCachedTokenProvider struct {
	// contains filtered or unexported fields
}

func NewKeyringCachedTokenProvider

func NewKeyringCachedTokenProvider(keyringCached *KeyringProvider) *KeyringCachedTokenProvider

func (*KeyringCachedTokenProvider) GetTokens

type KeyringProvider

type KeyringProvider interface {
	// contains filtered or unexported methods
}

type Options

type Options struct {
	ClientID  string `json:"client_id"`
	AuthURL   string
	NoBrowser bool
	genericiooptions.IOStreams
}

type Provider

type Provider interface {
	Login(ctx context.Context) (*authenticator.UserInfoResponse, string, error)
	Logout(ctx context.Context) error
}

func NewTokenProvider

func NewTokenProvider(o Options) (Provider, error)

NewTokenProvider default constructor.

type TokenProvider

type TokenProvider struct {
	// contains filtered or unexported fields
}

func (*TokenProvider) Login

func (*TokenProvider) Logout

func (p *TokenProvider) Logout(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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