tokencache

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	IssuerURL   string
	ClientID    string
	Username    string
	ExtraScopes []string
}

Key represents a key of a token cache.

type Repo

type Repo interface {
	FindByKey(dir string, key *Key) (*oidc.Token, error)
	Save(dir string, key *Key, token oidc.Token) error
}

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 NewRepository

func NewRepository() *Repository

func (*Repository) FindByKey

func (r *Repository) FindByKey(dir string, key *Key) (*oidc.Token, error)

func (*Repository) Save

func (r *Repository) Save(dir string, key *Key, tokenSet oidc.Token) error

Jump to

Keyboard shortcuts

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