Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
func CreateToken(claims CustomClaims) (string, error)
CreateToken creates a new token
Types ¶
type CustomClaims ¶
type CustomClaims struct { Id int64 AuthorityId int64 jwt.StandardClaims }
private claims, share information between parties that agree on using them CustomClaims Structured version of Claims Section, as referenced at https://tools.ietf.org/html/rfc7519#section-4.1 See examples for how to use this with your own claim types
func ParseToken ¶
func ParseToken(tokenString string) (*CustomClaims, error)
ParseToken parses the token.
Click to show internal directories.
Click to hide internal directories.