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 ¶
func Initialize(db *pg.DB, j TokenGenerator, sec Securer, rbac RBAC) Auth
Initialize initializes auth application service
func New ¶
func New(db *pg.DB, udb UserDB, j TokenGenerator, sec Securer, rbac RBAC) Auth
New creates new iam 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) (andro.AuthToken, error) Refresh(echo.Context, string) (string, error) Me(echo.Context) (andro.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.