jwt

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootPluginName = "http"
	PluginName     = "jwt"
)

Variables

This section is empty.

Functions

func CtxClaims

func CtxClaims(ctx context.Context) (claims jwt.UserClaims, ok bool)

func CtxUser

func CtxUser(ctx context.Context) (user models.User, ok bool)

func CtxUserId

func CtxUserId(ctx context.Context) string

Types

type Plugin

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

func (*Plugin) Handle

func (p *Plugin) Handle(next http.Handler) http.Handler

func (*Plugin) Init

func (p *Plugin) Init(cfg config.Configurer, service token.Service) error

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns user-friendly plugin name

Jump to

Keyboard shortcuts

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