Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidToken = errors.New("link token invalid")
)
Functions ¶
This section is empty.
Types ¶
type TokenCodec ¶
type TokenCodec struct {
// contains filtered or unexported fields
}
func NewTokenCodec ¶
func NewTokenCodec(keyVersion int, key string) *TokenCodec
func (*TokenCodec) DecodeToken ¶
func (c *TokenCodec) DecodeToken(tokenString string, tokenData TokenData) (*Token, error)
func (*TokenCodec) EncodeToken ¶
func (c *TokenCodec) EncodeToken(token *Token) (string, error)
type UserTokenData ¶
type UserTokenData struct {
User string `json:"user"`
}
func (*UserTokenData) MarshalJSON ¶
func (d *UserTokenData) MarshalJSON() ([]byte, error)
func (*UserTokenData) UnmarshalJSON ¶
func (d *UserTokenData) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.