Documentation ¶ Index ¶ type Base type ConfigJWT type JWT func New(c *ConfigJWT) *JWT func (s *JWT) Cookie(t []byte) *http.Cookie func (s *JWT) IsExpired(err error) bool func (s *JWT) IsNeedUpdate(err error) bool func (s *JWT) Read(r *http.Request) []byte func (s *JWT) Sign(d interface{}) ([]byte, error) func (s *JWT) Verify(token []byte) (interface{}, string, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Base ¶ type Base struct { Secret string `yaml:"secret"` TTL int `yaml:"ttl"` Name string `yaml:"name"` Domain string `yaml:"domain"` } type ConfigJWT ¶ type ConfigJWT struct { Base Base `yaml:"jwt"` } type JWT ¶ type JWT struct { // contains filtered or unexported fields } func New ¶ func New(c *ConfigJWT) *JWT func (*JWT) Cookie ¶ func (s *JWT) Cookie(t []byte) *http.Cookie func (*JWT) IsExpired ¶ func (s *JWT) IsExpired(err error) bool func (*JWT) IsNeedUpdate ¶ func (s *JWT) IsNeedUpdate(err error) bool func (*JWT) Read ¶ func (s *JWT) Read(r *http.Request) []byte func (*JWT) Sign ¶ func (s *JWT) Sign(d interface{}) ([]byte, error) func (*JWT) Verify ¶ func (s *JWT) Verify(token []byte) (interface{}, string, error) Source Files ¶ View all Source files config.go jwt.go jwt_easyjson.go Click to show internal directories. Click to hide internal directories.