tokens

package
v0.20.15 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatKey

func FormatKey(key string) string

func NewClientWithTokenSet

func NewClientWithTokenSet(ctx context.Context, conf *oauth2.Config, token *oauth2.Token,
	tokenSet TokenSet, tokenKey, serviceKey, serviceType string) (*http.Client, error)

Types

type TokenInfo

type TokenInfo struct {
	ServiceKey  string        `json:"serviceKey,omitempty"`
	ServiceType string        `json:"serviceType,omitempty"`
	Token       *oauth2.Token `json:"token,omitempty"`
}

func ParseTokenInfo

func ParseTokenInfo(data []byte) (*TokenInfo, error)

type TokenSet

type TokenSet interface {
	GetTokenInfo(key string) (*TokenInfo, error)
	GetToken(key string) (*oauth2.Token, error)
	SetTokenInfo(key string, tokenInfo *TokenInfo) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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