store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStoreOption

type MemoryStoreOption func(*memoryStore)

func WithClientConfig

func WithClientConfig(client *oauth2.Config) MemoryStoreOption

type Store

type Store interface {
	LookupClientConfig(issuer string) (*oauth2.Config, bool)
	AddClientConfig(issuer string, client *oauth2.Config) error
	AddAuthorizationServerMetadata(metadata *meta.AuthorizationServerMetadata) error
	LookupAuthorizationServerMetadata(issuer string) (*meta.AuthorizationServerMetadata, bool)
	AddIssuerPublicKeys(issuer string, keys map[string]crypto.PublicKey) error
	LookupIssuerPublicKeys(issuer string) (map[string]crypto.PublicKey, bool)
	AddToken(key TokenKey, token *oauth2.Token) error
	LookupToken(key TokenKey) (*oauth2.Token, bool)
}

Store is a pluggable persistence layer for tokens & client IDs. The in‑memory default is fine for CLI tools; swap with Redis/SQL for fleets.

func NewMemoryStore

func NewMemoryStore(options ...MemoryStoreOption) Store

type TokenKey

type TokenKey struct {
	Issuer string
	Scopes string
}

Jump to

Keyboard shortcuts

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