auth

package
v0.0.0-...-9d7ceaa Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthStrategy

type AuthStrategy interface {
	GenerateToken(resource string) string
	ValidateToken(token string) (*jwt.Token, error)
}

func GetAuthStrategyService

func GetAuthStrategyService(cacheClient *cache.Cache) (AuthStrategy, error)

type SimpleJwtAuth

type SimpleJwtAuth struct {
}

func (*SimpleJwtAuth) GenerateToken

func (sv *SimpleJwtAuth) GenerateToken(resource string) string

func (*SimpleJwtAuth) ValidateToken

func (sv *SimpleJwtAuth) ValidateToken(token string) (*jwt.Token, error)

type TlsJwtAuth

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

func (*TlsJwtAuth) GenerateToken

func (sv *TlsJwtAuth) GenerateToken(resource string) string

func (*TlsJwtAuth) SetCacheProvider

func (sv *TlsJwtAuth) SetCacheProvider(cacheClient *cache.Cache)

func (*TlsJwtAuth) ValidateToken

func (sv *TlsJwtAuth) ValidateToken(token string) (*jwt.Token, error)

Jump to

Keyboard shortcuts

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