Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidDataType = errors.New("given token data is not valid or supported, and thus can't be used")
Functions ¶
This section is empty.
Types ¶
type JWTTokenManager ¶
type JWTTokenManager struct { // This method must return pointer type. // Required, must be set. ClaimsFactory func() jwt.Claims SigningMethod jwt.SigningMethod // which alogrithm to use, required Secret interface{} // Key for signing, required }
func (*JWTTokenManager) IssueToken ¶
func (m *JWTTokenManager) IssueToken(data interface{}) (serializedToken []byte, err error)
func (*JWTTokenManager) ParseToken ¶
func (m *JWTTokenManager) ParseToken(token []byte) (data interface{}, err error)
type TokenIssuer ¶
Note: this is expected to be wrapped with app specific wrapper, which accepts only specified token type.
type TokenManager ¶
type TokenManager interface { TokenIssuer TokenParser }
type TokenParser ¶
Note: this is expected to be wrapped with app specific wrapper, which accepts only specified token type.
Click to show internal directories.
Click to hide internal directories.