auth

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Zlib Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const JwtMethod = "jwt"

Variables

This section is empty.

Functions

func JwtMethodKey added in v0.5.11

func JwtMethodKey(source token.Source) string

func SourceKey added in v0.5.11

func SourceKey(source token.Source) string

Types

type Engine added in v0.5.11

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

func DefaultEngine added in v0.5.11

func DefaultEngine() *Engine

func (*Engine) Client added in v0.5.11

func (eng *Engine) Client() token.Route

func (*Engine) Server added in v0.5.11

func (eng *Engine) Server() token.Route

type Item

type Item struct {
	Enabled bool          `json:"enabled"`
	Secret  secret.Secret `json:"secret"`
}

type SecretMgr

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

func NewSecretMgr added in v0.5.11

func NewSecretMgr(skFuncs token.SourceKeyFunc) *SecretMgr

func (*SecretMgr) AddItem added in v0.5.0

func (mgr *SecretMgr) AddItem(source token.Source, item Item)

func (*SecretMgr) AddItemWithKey added in v0.5.0

func (mgr *SecretMgr) AddItemWithKey(key string, item Item)

func (*SecretMgr) AddSecret added in v0.5.0

func (mgr *SecretMgr) AddSecret(source token.Source, secret secret.Secret)

func (*SecretMgr) AddSecretWithKey added in v0.5.0

func (mgr *SecretMgr) AddSecretWithKey(key string, secret secret.Secret)

func (*SecretMgr) GetSecret

func (mgr *SecretMgr) GetSecret(source token.Source) secret.Secret

GetSecret implement token.Secret interface

func (*SecretMgr) IsEnabled

func (mgr *SecretMgr) IsEnabled(source token.Source) bool

IsEnabled implement token.Secret interface

func (*SecretMgr) Load added in v0.5.0

func (mgr *SecretMgr) Load(items map[string]Item) error

func (*SecretMgr) LoadFromFile added in v0.5.0

func (mgr *SecretMgr) LoadFromFile(file string) error

func (*SecretMgr) SetEnabled

func (mgr *SecretMgr) SetEnabled(source token.Source, enable bool)

SetEnabled implement token.Secret interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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