secrets

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound = errors.New("key not found")
)
View Source
var SignedInChanged *signals.StatefulSignal[bool]
View Source
var SignedInState *state.State[bool]

Functions

func DeleteRefreshToken

func DeleteRefreshToken() error

func GetRefreshToken

func GetRefreshToken() string

func HasRefreshToken

func HasRefreshToken() bool

func SetRefreshToken

func SetRefreshToken(token string) error

func UserID

func UserID() string

Types

type AuthStrategy

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

func NewTokenAuthStrategy

func NewTokenAuthStrategy() *AuthStrategy

func (*AuthStrategy) Authenticate

func (s *AuthStrategy) Authenticate(req *http.Request, clientID, clientSecret string) error

func (*AuthStrategy) GetToken

func (s *AuthStrategy) GetToken(clientID, clientSecret string) (string, error)

type Item

type Item struct {
	Label    string
	Password string
}

type Service

type Service interface {
	Available() *ServiceError
	Delete(key string) error
	Get(key string) (Item, error)
	Has(key string) (bool, error)
	Set(key string, value Item) error
}

type ServiceError added in v1.1.0

type ServiceError struct {
	Title string
	Body  string
	Fatal bool
}

func Healthcheck added in v1.1.0

func Healthcheck() *ServiceError

Jump to

Keyboard shortcuts

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