clients

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientNotFound       = errors.New("client not found")
	ErrClientSecretMismatch = errors.New("client secret is not the given secret")
	ErrClientNoSecret       = errors.New("client has no secret")
	ErrClientSecretRequired = errors.New("client secret required")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	RedirectURIPattern         string `json:"redirect_uri_pattern,omitempty"`
	SecretHash                 string `json:"secret_hash,omitempty"`
	PresetID                   string `json:"preset,omitempty"`
	DisableImplicit            bool   `json:"disable_implicit,omitempty"`
	EnableRefreshTokenRotation bool   `json:"enable_refresh_token_rotation,omitempty"`
}

type Store

type Store interface {
	Authenticate(clientID, clientSecret string) (*Client, error)
	Lookup(clientID string) (*Client, error)
	List() ([]string, error)
	Ping() error
}

func NewInMemoryStore added in v0.8.0

func NewInMemoryStore(clientMap map[string]Client) Store

func NewSqlStore

func NewSqlStore(clientMap map[string]Client, dbs map[string]*sql.DB, settings *StoreSettings) (Store, error)

type StoreSettings

type StoreSettings struct {
	URI         string `json:"uri,omitempty"`
	LookupQuery string `json:"lookup_query,omitempty"`
	ListQuery   string `json:"list_query,omitempty"`
}

Jump to

Keyboard shortcuts

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