Documentation ¶ Index ¶ func GenJWT(u string, g []string, p *rsa.PrivateKey, t int64) (string, error) type CustomClaims Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GenJWT ¶ func GenJWT(u string, g []string, p *rsa.PrivateKey, t int64) (string, error) GenJWT generates the jwt token. Among other stuff, it packs in the authenticated user name and the roles that the user belongs to and an expiration time. The info is then signed by the private key of the login server. Types ¶ type CustomClaims ¶ type CustomClaims struct { User string `json:"user"` Roles []string `json:"roles"` jwt.StandardClaims } Source Files ¶ View all Source files util.go Click to show internal directories. Click to hide internal directories.