Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SessionJwt ¶
type SessionJwt struct {
// contains filtered or unexported fields
}
SessionJwt implements storage interface using jwt-token mechanism where all optional data stored on the user side.
func (*SessionJwt) Create ¶
func (j *SessionJwt) Create(data map[string]interface{}) (sessions.Token, error)
Create generates new jwt token and return it as a signed string
func (*SessionJwt) Delete ¶
func (j *SessionJwt) Delete(token sessions.Token) error
Delete token associated id in storage if it present
func (*SessionJwt) Get ¶
func (j *SessionJwt) Get(token sessions.Token) (map[string]interface{}, error)
Get validates token, checks expiration, checks storage for such token if it present and return data form given token
func (*SessionJwt) RefreshToken ¶
func (j *SessionJwt) RefreshToken(oldToken sessions.Token) (sessions.Token, error)
RefreshToken refresh given token
Click to show internal directories.
Click to hide internal directories.