jwt

package
v0.0.0-...-8a4eff6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(key []byte) endpoint.Middleware

func OptionalMiddleware

func OptionalMiddleware(key []byte) endpoint.Middleware

Types

type Claims

type Claims struct {
	UserID  int  `json:"user_id"`
	IsAdmin bool `json:"is_admin"`
	jwt.StandardClaims
}

type EncodeDecoder

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

func NewEncodeDecoder

func NewEncodeDecoder(key []byte) *EncodeDecoder

func (*EncodeDecoder) Decode

func (e *EncodeDecoder) Decode(bearer string) (int, bool, error)

func (*EncodeDecoder) Encode

func (e *EncodeDecoder) Encode(userID int, isAdmin bool) (string, error)

Jump to

Keyboard shortcuts

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