Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTAuth ¶
type JWTAuth struct {
Secret string
}
JWTAuth handles encoding and decoding JWT tokens.
func (*JWTAuth) Create ¶
func (auth *JWTAuth) Create(meta interface{}, issuer string, expirationInMinutes uint) (string, error)
Create creates a JWT token for a given user ID.
func (*JWTAuth) ExtractFromHeader ¶
ExtractFromHeader returns the encoded object from the header.
Click to show internal directories.
Click to hide internal directories.