Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
PrivateKey string
}
AuthService is a mailspree.AuthService based on jwt.
func (AuthService) Authenticate ¶
Authenticate takes a user and password, if they match, a jwt is returned. If not an error is returned.
func (AuthService) Validate ¶
func (as AuthService) Validate(tokenStr string, us mailspree.UserService) (mailspree.User, error)
Validate takes a jwt token string and validates it. If it passes validation, user is fetched and returned from the user service
Click to show internal directories.
Click to hide internal directories.