package
0.0.0-20240911163354-b209892be274
Repository: https://github.com/build-d-an-ki-n-truc/auth.git
Documentation: pkg.go.dev
# Functions
Subcriber for login Brand, Payload should have data:
Payload: Payload{ data: { "username": "username", "password": "password", }, },
auth/loginBrand POST.
Subcriber for login, Payload should have data:
Payload: Payload{ data: { "username": "username", "password": "password", }, },
auth/login POST.
Subcriber for create a Brand, Payload should have data:
Params: { crypted: bool // "true or false" }
Payload: Payload{ Data:{ "username": username, "password": password, "name": name, "email": email, "role": brand, "phone": phone, "isLocked": isLocked, "brandID": brandID, }, },
auth/register/brand?crypted=bool POST -> create a Brand User.
Subcriber for register, Request should have data:
Params: { crypted: bool // "true or false" }
Payload: Payload{
Data: { "username": "username", "password": "password", "name": "name", "email": "email", "role": "role", "phone": "phone", "isLocked": false, }, },
auth/register/user?crypted=boolean POST.
Send OTP email to user subcriber Request should have data:
Payload: Payload{ Data: { "email": "email", }, },
auth/sendOTP POST this will return a OTP if success and error if failed.
Subcriber for verifying token, Request should have data:
Headers: Header{ Authorization: "Bearer " + token, },
Authorization: Authorization{ User: User{ Username: username, Role: role, }, },
Payload: Payload{ Data: ["roleRequired"] Ex: ["admin","user","brand"] },
["roleRequired"] Ex: ["admin", "user","brand"].
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
In Data should have username and password for login.
Struct for a Request.
No description provided by the author
No description provided by the author