tokencache

package
v1.16.2-pipedrive Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Set provides an implementation and interface for Kubeconfig.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	FindByKey(dir string, key Key) (*TokenCache, error)
	Save(dir string, key Key, cache TokenCache) error
}

type Key

type Key struct {
	IssuerURL string
	ClientID  string
}

Key represents a key of a token cache.

type Repository

type Repository struct{}

Repository provides access to the token cache on the local filesystem. Filename of a token cache is sha256 digest of the issuer, zero-character and client ID.

func (*Repository) FindByKey

func (r *Repository) FindByKey(dir string, key Key) (*TokenCache, error)

func (*Repository) Save

func (r *Repository) Save(dir string, key Key, cache TokenCache) error

type TokenCache

type TokenCache struct {
	IDToken      string `json:"id_token,omitempty"`
	RefreshToken string `json:"refresh_token,omitempty"`
}

TokenCache represents a token cache.

Directories

Path Synopsis
Package mock_tokencache is a generated GoMock package.
Package mock_tokencache is a generated GoMock package.

Jump to

Keyboard shortcuts

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