auth

package
v0.0.0-...-5b64428 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	TokenString string
	ExpiresAt   time.Time
}

type HttpTokenRetriever

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

func NewHttpTokenRetriever

func NewHttpTokenRetriever(httpDoer net.HttpDoer, apiUrl string, responseChecker net.ResponseChecker) *HttpTokenRetriever

func (*HttpTokenRetriever) RetrieveToken

func (retriever *HttpTokenRetriever) RetrieveToken(clientId string, clientSecret string) (*AccessToken, error)

type TokenCache

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

func NewHttpTokenCache

func NewHttpTokenCache(tokenRetriever TokenRetriever) *TokenCache

func (*TokenCache) RetrieveToken

func (cache *TokenCache) RetrieveToken(clientId string, clientSecret string) (*AccessToken, error)

type TokenRetriever

type TokenRetriever interface {
	RetrieveToken(clientId string, clientSecret string) (*AccessToken, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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