Documentation
¶
Index ¶
Constants ¶
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
NewCache constructs disk cache, that will store tokens to ${path}/token_${os.Args[0]}_${ClientID}
func NewCacheEnt ¶ added in v0.6.0
func NewCacheEnt(path string, localEnt string, cfg login.OIDCConfig) *Cache
NewCacheEnt constructs disk cache, that will store tokens to ${path}/token_${localEnt}_${ClientID}. localEnt is local entity name, for example tool name (see NewCache). If you need to request two tokens with different scopes using the same ClientID in the same tool, you have to use two different entities.