Documentation ¶
Index ¶
- func AddDefaultClaims(token jwt.Token) (jwt.Token, error)
- func AddJSONFileClaimsToToken(t jwt.Token, path string) (jwt.Token, error)
- func AddJSONStringClaimsToToken(t jwt.Token, s string) (jwt.Token, error)
- func AddMapClaimsToToken(t jwt.Token, cs map[string]string) (jwt.Token, error)
- func NewToken() jwt.Token
- func SignToken(token jwt.Token, key crypto.PrivateKey) (string, error)
- type DefaultClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultClaims ¶
AddDefaultClaims adds default claims to jwt
func AddJSONFileClaimsToToken ¶
AddJSONFileClaimsToToken adds content of json file to token
func AddJSONStringClaimsToToken ¶ added in v0.0.4
AddJSONStringClaimsToToken parses the string and adds the claims to the token
func AddMapClaimsToToken ¶ added in v0.0.5
AddMapClaimsToToken adds all the properties of a map to the token
Types ¶
type DefaultClaims ¶ added in v0.0.4
DefaultClaims is a structure that contains the default claims as well as a Description of how the Value was computed
func GetDefaultClaims ¶ added in v0.0.4
func GetDefaultClaims() []DefaultClaims
GetDefaultClaims returns a list of default claims. Default claims have been taken from rfc 7519
Click to show internal directories.
Click to hide internal directories.