Documentation ¶
Index ¶
- type JWTManager
- func (m *JWTManager) CheckUnauthorizedToken(ctx context.Context, tokenString string) error
- func (m *JWTManager) Generate(claims map[string]string, expiration time.Time) (string, error)
- func (m *JWTManager) InvalidateToken(ctx context.Context, tokenString string) error
- func (m *JWTManager) Validate(ctx context.Context, tokenString string) (map[string]string, error)
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTManager ¶
type JWTManager struct { Storage *storage.Storage RDB *redis.Client // contains filtered or unexported fields }
func NewJWTManager ¶
func NewJWTManager(secret string, store *storage.Storage, rdb *redis.Client) *JWTManager
func (*JWTManager) CheckUnauthorizedToken ¶
func (m *JWTManager) CheckUnauthorizedToken(ctx context.Context, tokenString string) error
func (*JWTManager) InvalidateToken ¶
func (m *JWTManager) InvalidateToken(ctx context.Context, tokenString string) error
Click to show internal directories.
Click to hide internal directories.