Documentation ¶
Index ¶
- type Service
- func (service *Service) CreateToken(userID uint, name string) (*models.AccessToken, error)
- func (service *Service) GetUserByToken(token string) (*models.User, error)
- func (service *Service) GetUserTokens(userID uint) ([]*models.AccessToken, error)
- func (service *Service) RemoveToken(id uint, userID uint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages access tokens
func (*Service) CreateToken ¶
CreateToken generates an access token
func (*Service) GetUserByToken ¶
GetUserByToken returns the user associated with the given token
func (*Service) GetUserTokens ¶
func (service *Service) GetUserTokens(userID uint) ([]*models.AccessToken, error)
GetUserTokens returns all access tokens associated with a user
Click to show internal directories.
Click to hide internal directories.