credentialstore

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileOnly

func FileOnly() bool

FileOnly reports whether KAPTEN_CREDENTIALS_STORE=file keeps credentials out of the OS keychain, as in containers and CI where none runs.

Types

type Store

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

func New

func New(service, file string) *Store

func (*Store) Delete

func (s *Store) Delete(key string) error

func (*Store) Get

func (s *Store) Get(key string) (Token, string, error)

func (*Store) Set

func (s *Store) Set(key string, t Token) (string, error)

type Token

type Token struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token,omitempty"`
	TokenType    string `json:"token_type,omitempty"`
	Expiry       int64  `json:"expiry,omitempty"`
	// DPoPKey is the private JWK the tokens are bound to (see package dpop).
	DPoPKey string `json:"dpop_key,omitempty"`
}

Jump to

Keyboard shortcuts

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