Documentation ¶
Index ¶
- func SourceAt(source string) string
- func SourceKeyForClient(source app.Source) string
- func SourceKeyForServer(source app.Source) string
- type Authenticate
- func (t *Authenticate) Check(source app.Source, tokenString string) (*token.Token, error)
- func (t *Authenticate) Generate(session token.Session, app app.Info, auth string, expire int64) (string, error)
- func (t *Authenticate) IsEnabled(source app.Source) bool
- func (t *Authenticate) SetEnabled(source app.Source, enable bool)
- type Item
- type SecretMgr
- func (mgr *SecretMgr) AddItem(source app.Source, item Item)
- func (mgr *SecretMgr) AddItemWithKey(key string, item Item)
- func (mgr *SecretMgr) AddSecret(source app.Source, secret secret.Secret)
- func (mgr *SecretMgr) AddSecretWithKey(key string, secret secret.Secret)
- func (mgr *SecretMgr) GetSecret(source app.Source) secret.Secret
- func (mgr *SecretMgr) IsEnabled(source app.Source) bool
- func (mgr *SecretMgr) Load(items map[string]Item) error
- func (mgr *SecretMgr) LoadFromFile(file string) error
- func (mgr *SecretMgr) SetEnabled(source app.Source, enable bool)
- type SecretOBJ
- type SourceKeyFuncs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SourceKeyForClient ¶
func SourceKeyForServer ¶
Types ¶
type Authenticate ¶
type Authenticate struct {
// contains filtered or unexported fields
}
func New ¶
func New(secret SecretOBJ) *Authenticate
func (*Authenticate) Generate ¶
func (t *Authenticate) Generate(session token.Session, app app.Info, auth string, expire int64) (string, error)
Generate implement token.Check interface
func (*Authenticate) IsEnabled ¶
func (t *Authenticate) IsEnabled(source app.Source) bool
IsEnabled implement token.Check interface
func (*Authenticate) SetEnabled ¶
func (t *Authenticate) SetEnabled(source app.Source, enable bool)
SetEnabled implement token.Check interface
type SecretMgr ¶
type SecretMgr struct {
// contains filtered or unexported fields
}
func NewMgr ¶
func NewMgr(skFuncs SourceKeyFuncs) *SecretMgr
func (*SecretMgr) AddItemWithKey ¶ added in v0.5.0
func (*SecretMgr) AddSecretWithKey ¶ added in v0.5.0
func (*SecretMgr) LoadFromFile ¶ added in v0.5.0
type SourceKeyFuncs ¶
SourceKeyFuncs source to key function
Click to show internal directories.
Click to hide internal directories.