Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func CreateUser() http.HandlerFunc
The User struct is responsible for getting the req.Body and inserting it into the database and the same is responsible for "porpulating" the JSON that returns from the database
Please you from the frontend, redirect the user to the route
/api/v{n}/authenticate
Here I just create the user, I don't have any JWT authenticate here
func IsDuplicate ¶
Types ¶
type Auth ¶
type Auth struct { UserName string `json:"username" db:"username"` Password string `json:"passwd" db:"passwd"` }
func (*Auth) Authenticate ¶
func (auth *Auth) Authenticate() http.HandlerFunc
A fake function that returns the entered data in the req.Body and a token that is also fake
func (*Auth) AuthenticateSSO ¶
func (auth *Auth) AuthenticateSSO() http.HandlerFunc
Just like the previous function, this one is no different, it will return the entered data in the req.Body and a token that is also fake
Click to show internal directories.
Click to hide internal directories.