auth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSessionManager

func InitSessionManager(etcd *v3.Client, timeout time.Duration) error

Types

type Config

type Config struct {
	Endpoint     string `json:"endpoint"`
	Realm        string `json:"realm"`
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	Admin        string `json:"admin"`
	Password     string `json:"password"`
}

func New

func New() *Config

func (*Config) Key

func (c *Config) Key() string

func (*Config) Validate

func (c *Config) Validate() error

type Session

type Session interface {
	StoreSid(ctx context.Context, sid string, token string, ttl time.Duration) error
	Sid(parent context.Context, sid string) (string, error)
}

func SessionManager

func SessionManager() Session

Jump to

Keyboard shortcuts

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