Documentation
¶
Index ¶
- type Service
- func (service *Service) GetUser(r *http.Request) (*models.User, error)
- func (service *Service) Login(r *http.Request, w http.ResponseWriter, id uint, username string) error
- func (service *Service) Logout(r *http.Request, w http.ResponseWriter)
- func (service *Service) SetUser(r *http.Request, w http.ResponseWriter, user *models.User)
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 authentification.
func NewService ¶
NewService returns a new suthentification service
func (*Service) Login ¶
func (service *Service) Login(r *http.Request, w http.ResponseWriter, id uint, username string) error
Login finds or creates a user and associates it with the request
Click to show internal directories.
Click to hide internal directories.