Versions in this module Expand all Collapse all v0 v0.1.0 Jul 10, 2020 Changes in this version + var ErrFailedGetClaim = fmt.Errorf("failed to get token claims") + var ErrNotValidToken = fmt.Errorf("token is not valid") + func NewServer(srv fasthttp.RequestHandler, errorProcessor ErrorProcessor, ...) fasthttp.RequestHandler + type ClaimsJWT struct + type ContextTokenStorage interface + Get func(ctx context.Context) (token JWT, found bool) + Set func(ctx *fasthttp.RequestCtx, token JWT) + func NewContextTokenStorage(ctxJWTKey string) ContextTokenStorage + type ErrorCreator func(status int, format string, v ...interface{}) error + type ErrorProcessor interface + Encode func(ctx context.Context, r *fasthttp.Response, err error) + type Generator struct + func NewGenerator(privateKey jose.JSONWebKey, expireIn time.Duration, timeFunc func() time.Time) *Generator + func (g *Generator) Generate(links ...[]byte) (token []byte, err error) + type JWT struct + Links [][]byte + Original []byte + type PrivateKeyLoader struct + func NewPrivateKeyLoader(jwkUse string, jwkAlgorithm string, hash crypto.Hash) *PrivateKeyLoader + func (p *PrivateKeyLoader) Load(file string) (privateKey jose.JSONWebKey, err error) + type PublicKeyLoader struct + func NewPublicKeyLoader(jwkUse string, jwkAlgorithm string, hash crypto.Hash) *PublicKeyLoader + func (p *PublicKeyLoader) Load(file string) (publicKey jose.JSONWebKey, err error) + type Server struct + func (s *Server) ServeHTTP(ctx *fasthttp.RequestCtx) + type Verifier struct + func NewVerifier(key *rsa.PublicKey) *Verifier + func (v *Verifier) Verify(token []byte) (jwt JWT, err error)