Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginController ¶
type LoginController struct { // Dependencies AuthService LoginService }
func (LoginController) ListRoutes ¶
func (controller LoginController) ListRoutes() []route.Route
type LoginService ¶
type Middleware ¶
type Middleware struct {
LoginService LoginService
}
func (Middleware) Intercept ¶
func (middleware Middleware) Intercept(handler route.SecureHandler) route.Handler
type UserIdLoginService ¶
func (UserIdLoginService) AuthenticateOrSignup ¶
func (service UserIdLoginService) AuthenticateOrSignup(credentials userLoginCredentials) (string, bool, error)
AuthenticateOrSignup tries to authenticate the user specified with the credentials, and returns the user token or an error. In case a user with these credentials cannot be found, it creates a new user with that username.
func (UserIdLoginService) IsAuthenticated ¶
func (service UserIdLoginService) IsAuthenticated(authToken string) (string, error)
IsAuthenticated checks if the given authToken can be assigned to a User. In case no user is found, it returns errUnknownUser
Click to show internal directories.
Click to hide internal directories.