jwtauth

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyInfoNotFound = fmt.Errorf("key info not found")
)

Functions

This section is empty.

Types

type APIAlg

type APIAlg jwt3.HMACSHA

type JwtAuth

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

func NewJwtAuth

func NewJwtAuth(lr repo.Repo) (*JwtAuth, error)

func (*JwtAuth) API

func (jwtAuth *JwtAuth) API() *JwtAuthAPI

type JwtAuthAPI

type JwtAuthAPI struct {
	JwtAuth *JwtAuth
}

func (*JwtAuthAPI) AuthNew

func (a *JwtAuthAPI) AuthNew(ctx context.Context, perms []auth.Permission) ([]byte, error)

func (*JwtAuthAPI) AuthVerify

func (a *JwtAuthAPI) AuthVerify(ctx context.Context, token string) ([]auth.Permission, error)

type JwtPayload

type JwtPayload struct {
	Allow []auth.Permission
}

Jump to

Keyboard shortcuts

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