Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
func CreateToken(ht HandlerType, user *user_model.User, data []byte) (string, error)
CreateToken creates a token for the action/user tuple
Types ¶
type HandlerType ¶
type HandlerType byte
const ( UnknownHandlerType HandlerType = iota ReplyHandlerType UnsubscribeHandlerType )
func ExtractToken ¶
func ExtractToken(ctx context.Context, token string) (HandlerType, *user_model.User, []byte, error)
ExtractToken extracts the action/user tuple from the token and verifies the content
Click to show internal directories.
Click to hide internal directories.