Documentation ¶
Index ¶
- Variables
- func JwtWithCreateToken(accountId string, role string, expireIn time.Duration) (string, error)
- func StateTokenWithCount(ctx context.Context, id string) (int64, error)
- func StateTokenWithParseJwtToken(jwtToken string) (string, error)
- func StateTokenWithRenew(ctx context.Context, oldToken, newToken string, id string, ...) error
- func StateTokenWithRevoke(ctx context.Context, token string) error
- func StateTokenWithRevokeAll(ctx context.Context, id string) error
- func StateTokenWithSearchList(ctx context.Context, id string) ([]string, error)
- type JwtClaims
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SigningKey = []byte("123") ErrTokenExpired = errors.New("token is expired") ErrTokenIllegal = errors.New("token is illegal") )
View Source
var ErrorNoAuth = errors.New("no auth")
View Source
var (
TokenLimitPerAccount int64 = 10
)
Functions ¶
func JwtWithCreateToken ¶
func StateTokenWithRenew ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.