Documentation
¶
Overview ¶
Package jwt implements the JavaScript Web Token that can be used for authentication of users.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWT ¶
type JWT struct { // ExpirationInterval of the token. ExpirationInterval time.Duration // RefreshInterval of the token. RefreshInterval time.Duration // Secret is used to sign the token. Secret []byte // AuthType defines the authentication type, i.e., the prefix before the // token in authorization header. AuthType string }
JWT defines and creates the token and it's properties.
func (*JWT) GetTokenFromHeader ¶
GetTokenFromHeader returns the token from gin Context.
func (*JWT) RefreshToken ¶
RefreshToken returns the refresh token for an expired token.
Click to show internal directories.
Click to hide internal directories.