Documentation
¶
Overview ¶
Package gwt implements an api token manager with rsa crypto
Index ¶
- func Config(secret string, encoding string)
- func IsExpired(err error) bool
- func ParseToken(tokenString string, v interface{}) (err error)
- func ParseTokenBy(issuer string, tokenString string, v interface{}) (err error)
- func SignToken(payload interface{}, expires time.Duration) (token string, err error)
- func SignTokenBy(issuer string, payload interface{}, expires time.Duration) (token string, err error)
- type Channel
- type GWT
- func (gwt *GWT) ParseToken(tokenString string, v interface{}) (err error)
- func (gwt *GWT) ParseTokenBy(issuer string, tokenString string, v interface{}) (err error)
- func (gwt *GWT) SignToken(payload interface{}, expires time.Duration) (token string, err error)
- func (gwt *GWT) SignTokenBy(issuer string, payload interface{}, expires time.Duration) (token string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExpired ¶ added in v0.5.5
IsExpired returns a boolean indicating whether the error is known to report that a gwt token is expired.
func ParseToken ¶
ParseToken parses a token
func ParseTokenBy ¶ added in v0.5.5
ParseTokenBy parses a token with issuer
Types ¶
type GWT ¶
GWT is an api token manager with rsa crypto
func (*GWT) ParseToken ¶
ParseToken parses a token
func (*GWT) ParseTokenBy ¶ added in v0.5.5
ParseTokenBy parses a token with issuer
Click to show internal directories.
Click to hide internal directories.