disk

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCachePath = "$HOME/.oidc_keys"

DefaultCachePath is default path for OIDC tokens.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache is a oidc caching structure that stores all tokens on disk. Tokens cache files are named after clientID and arg[0]. NOTE: There is no logic for cleaning cache in case of change in clientID. NOTE: There is no logic for caching configuration as well.

func NewCache

func NewCache(path string, cfg login.OIDCConfig) *Cache

NewTokenCache constructs disk cache.

func (*Cache) Config

func (c *Cache) Config() login.OIDCConfig

Config returns OIDC configuration.

func (*Cache) SaveToken

func (c *Cache) SaveToken(token *oidc.Token) error

SaveToken saves token in file.

func (*Cache) Token

func (c *Cache) Token() (*oidc.Token, error)

Token retrieves token from file.

Jump to

Keyboard shortcuts

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