go-micro: github.com/micro/go-micro/auth/jwt Index | Files

package jwt

import "github.com/micro/go-micro/auth/jwt"

Index

Package Files

jwt.go

Variables

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

ErrEncodingToken is returned when the service encounters an error during encoding

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

ErrInvalidPrivateKey is returned when the service provided an invalid private key

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

ErrInvalidToken is returned when the token provided is not valid

var ErrMissingToken = errors.New("A valid JWT is required")

ErrMissingToken is returned when no token is provided

func NewAuth Uses

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

NewAuth returns a new instance of the Auth service

type AuthClaims Uses

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

Package jwt imports 4 packages (graph). Updated 2020-02-22. Refresh now. Tools for package owners.