clients

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 7 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" db:"redirect_uri_pattern"`
	SecretHash                 string `json:"secret_hash,omitempty" db:"secret_hash"`
	SessionName                string `json:"session_name,omitempty" db:"session_name"`
	DisableImplicit            bool   `json:"disable_implicit,omitempty" db:"disable_implicit"`
	EnableRefreshTokenRotation bool   `json:"enable_refresh_token_rotation,omitempty" db:"enable_refresh_token_rotation"`
}

type Store

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

func NewInMemoryClientStore

func NewInMemoryClientStore(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"`
	Query string `json:"query,omitempty"`
}

Jump to

Keyboard shortcuts

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