Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶
HashPassword - calculates hash and error if not success
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller for user auth
func NewController ¶
func NewController(userStorage UserStorage, jwtManager *crypta.JWTManager, logger logging.Logger) *Controller
func (*Controller) Login ¶
func (c *Controller) Login(ctx context.Context, username string, password string) (*servicepb.LoginResponse, error)
Login by login and password
func (*Controller) Register ¶
func (c *Controller) Register(ctx context.Context, username, password string) (*servicepb.RegisterResponse, error)
Register by login and password
Click to show internal directories.
Click to hide internal directories.