Categorygithub.com/go-cinch/common/jwt
modulepackage
1.0.3
Repository: https://github.com/go-cinch/common.git
Documentation: pkg.go.dev

# README

Jwt

jwt token generator based on golang-jwt, used under cinch layout.

Usage

go get -u github.com/go-cinch/common/jwt
  • NewServerContext - new server context with jwt.Claims
  • NewServerContextByUser - new server context with User
  • NewServerContextByReplyMD - new server context with x-md-global-code and x-md-global-platform
  • FromServerContext - get user from server context
  • TokenFromServerContext - get jwt token from server context
  • AppendToClientContext - append user to grpc client
  • AppendToReplyHeader - append user to grpc response header
  • User.CreateToken - generate jwt token by User

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author