Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSigningMethod = jwt.SigningMethodHS256
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { // The identity of this token, which can be any data that is json serializable. Identity interface{} // Every time a user authenticates by providing a username and password, // they receive a Fresh access token that can access any route. // // But after some time, that token should no longer be considered fresh, // and some critical or dangerous routes will be blocked until the user verifies their password again. Fresh bool // TokenType includes AccessTokenType and RefreshTokenType. TokenType TokenType jwt.RegisteredClaims }
Claims is the custom claims type.
func (*Claims) HasExpired ¶
HasExpired returns true if the token has expired.
type JwtAuth ¶
type JwtAuth struct {
*Options
}
func (*JwtAuth) CreateAccessToken ¶
CreateAccessToken create a new access token. The identity of this token, which can be any data that is json serializable.
func (*JwtAuth) CreateRefreshToken ¶
CreateRefreshToken create a new refresh token. The identity of this token, which can be any data that is json serializable.
func (*JwtAuth) ParseJwtToken ¶
Click to show internal directories.
Click to hide internal directories.