Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserAuthenticator ¶
type UserAuthenticator struct {
// contains filtered or unexported fields
}
func NewUserAuthenticator ¶
func NewUserAuthenticator(secret string) *UserAuthenticator
func (*UserAuthenticator) IsUser ¶
func (u *UserAuthenticator) IsUser(token string, userID string) bool
IsUser is a simpler version of Validate, throwing away the error
func (*UserAuthenticator) UserClaims ¶
func (u *UserAuthenticator) UserClaims(tokenString string) (*UserClaims, error)
Claims returns the complete JWT claims object
type UserClaims ¶
type UserClaims struct { UserID ID `json:"user_id"` jwt.StandardClaims }
Click to show internal directories.
Click to hide internal directories.