token

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source interface {
	Token() (*oauth2.Token, error)
	TokenSource() (oauth2.TokenSource, error)
	Verify() (*goesi.VerifyResponse, error)
}

Source is interface for token source.

func NewSource

func NewSource(log logger, client *http.Client, storage Storage, secretKey []byte, clientID, ssoSecret string, callbackURL string, scopes []string) Source

NewSource returns new token source from storage.

type Storage

type Storage interface {
	Read() (oauth2.Token, error)
	Write(oauth2.Token) error
}

Storage is interface for accessing token data.

func NewFileStorage

func NewFileStorage(filename string) Storage

NewFileStorage returns token storage in file.

Jump to

Keyboard shortcuts

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