jwt

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEncodingToken = errors.New("An error occured while encoding the JWT")

ErrEncodingToken is returned when the service encounters an error during encoding

View Source
var ErrInvalidPrivateKey = errors.New("An invalid private key was provided")

ErrInvalidPrivateKey is returned when the service provided an invalid private key

View Source
var ErrInvalidToken = errors.New("An invalid token was provided")

ErrInvalidToken is returned when the token provided is not valid

Functions

func NewAuth

func NewAuth(opts ...auth.Option) auth.Auth

NewAuth returns a new instance of the Auth service

Types

type AuthClaims

type AuthClaims struct {
	Id       string            `json:"id"`
	Roles    []*auth.Role      `json:"roles"`
	Metadata map[string]string `json:"metadata"`

	jwt.StandardClaims
}

AuthClaims to be encoded in the JWT

Jump to

Keyboard shortcuts

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