auth

package
v0.0.0-...-eb626f9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(store Store, opts ...Option) auth.Repository

Types

type Option

type Option func(*options)

func SetExpired

func SetExpired(expired int) Option

func SetKeyFunc

func SetKeyFunc(keyFunc jwt.Keyfunc) Option

func SetRootUser

func SetRootUser(id, password string) Option

func SetSigningKey

func SetSigningKey(key interface{}) Option

func SetSigningMethod

func SetSigningMethod(method jwt.SigningMethod) Option

type Store

type Store interface {
	Set(ctx context.Context, tokenString string, expiration time.Duration) error
	Check(ctx context.Context, tokenString string) (bool, error)
	Close() error
}

Directories

Path Synopsis
store

Jump to

Keyboard shortcuts

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