Documentation ¶
Index ¶
- func GetClaims(claims jwt.Claims) (name string, exp float64)
- func NewInMemorySessionPersistance(addr, password string, logger log.Logger) (*inMemorySessionPersistance, error)
- func NewToken(exp int64, username string, secret []byte) (string, error)
- func VerifyToken(tokenString string, secret []byte) (jwt.Claims, error)
- type Manager
- type Persistance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(persistance Persistance, secret []byte) *Manager
func (*Manager) GetSessionToken ¶
GetSessionToken creates and then returns a new token for the given user.
func (*Manager) InvlidateAllTokens ¶
InvlidateAllTokens invalidates all tokens of a user by putting them on the black list.
func (*Manager) InvlidateToken ¶
InvlidateToken puts the token on the black list.
Click to show internal directories.
Click to hide internal directories.