Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidCredentials = echo.NewHTTPError(http.StatusUnauthorized, "Username or password does not exist")
)
Custom errors
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth represents auth application service
func Initialize ¶
Initialize initializes auth application service
func (*Auth) Authenticate ¶
Authenticate tries to authenticate the user provided by username and password
type Service ¶
type Service interface { Authenticate(echo.Context, string, string) (*gorsk.AuthToken, error) Refresh(echo.Context, string) (*gorsk.RefreshToken, error) Me(echo.Context) (*gorsk.User, error) }
Service represents auth service interface
type TokenGenerator ¶
TokenGenerator represents token generator (jwt) interface
Click to show internal directories.
Click to hide internal directories.