Documentation ¶
Index ¶
- type JWT
- type Service
- func (s *Service) Authenticate(c context.Context, email, password string) (*model.AuthToken, error)
- func (s *Service) Mobile(c *gin.Context, m *request.MobileSignup) error
- func (s *Service) MobileVerify(c context.Context, countryCode, mobile, code string, signup bool) (*model.AuthToken, error)
- func (s *Service) Refresh(c context.Context, refreshToken string) (*model.RefreshToken, error)
- func (s *Service) Signup(c *gin.Context, e *request.EmailSignup) error
- func (s *Service) User(c *gin.Context) *model.AuthUser
- func (s *Service) Verify(c context.Context, token string) 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 represents the auth application service
func NewAuthService ¶
func NewAuthService(userRepo model.UserRepo, accountRepo model.AccountRepo, jwt JWT, m mail.Service, mob mobile.Service) *Service
NewAuthService creates new auth service
func (*Service) Authenticate ¶
Authenticate tries to authenticate the user provided by username and password
func (*Service) Mobile ¶
Mobile returns any error from creating a new user in our database with a mobile number
func (*Service) MobileVerify ¶
func (s *Service) MobileVerify(c context.Context, countryCode, mobile, code string, signup bool) (*model.AuthToken, error)
MobileVerify verifies the mobile verification code, i.e. (6-digit) code
Click to show internal directories.
Click to hide internal directories.