Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTokenMalformed = apperr.New("token_malformed_error", apperr.WithTextTranslate(i18n.ErrTokenMalformed), apperr.WithCode(code.Unauthenticated)) ErrTokenNotValidYet = apperr.New("token_not_valid_yet", apperr.WithTextTranslate(i18n.ErrTokenNotValidYet), apperr.WithCode(code.Unauthenticated)) ErrTokenUnknown = apperr.New("token_unknown", apperr.WithTextTranslate(i18n.ErrTokenUnknown), apperr.WithCode(code.Unauthenticated)) ErrTokenExpired = apperr.New("token_expired", apperr.WithTextTranslate(i18n.ErrTokenExpired), apperr.WithCode(code.Unauthenticated)) ErrTokenNotExist = apperr.New("token_not_exist", apperr.WithTextTranslate(i18n.ErrTokenNotExist), apperr.WithCode(code.Unauthenticated)) ErrTokenKicked = apperr.New("token_kicked", apperr.WithTextTranslate(i18n.ErrTokenKicked), apperr.WithCode(code.Unauthenticated)) )
Functions ¶
Types ¶
type Claims ¶
func GetClaimFromToken ¶
type LinkClaims ¶ added in v2.3.27
type LinkClaims struct { Link string jwt.RegisteredClaims }
func BuildLinkClaims ¶ added in v2.3.27
func BuildLinkClaims(link string, ttl time.Duration) LinkClaims
func GetLinkClaimFromToken ¶ added in v2.3.27
func GetLinkClaimFromToken(tokensString string, secretFunc jwt.Keyfunc) (*LinkClaims, error)
Click to show internal directories.
Click to hide internal directories.