Documentation ¶
Index ¶
- func Authorizer(u, p, path, method, secretKey string) error
- func FiberAuthHandler(c *fiber.Ctx, secretKey string) error
- func HttpAuthHandler(accountname string, secretKey string) http.HandlerFunc
- func ParseAndVerifyToken(password string, secretKey string) (userName, accountName, access string, err error)
- func ParseToken(password string) (userName, accountName, access string, err error)
- func StartServer(envs *env.Envs) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authorizer ¶
func FiberAuthHandler ¶
func HttpAuthHandler ¶
func HttpAuthHandler(accountname string, secretKey string) http.HandlerFunc
func ParseAndVerifyToken ¶
func ParseAndVerifyToken(password string, secretKey string) (userName, accountName, access string, err error)
ParseAndVerifyToken parses the token and verifies it with the secret key and returns the username, accountname, access and error
func ParseToken ¶
ParseToken parses the token and returns the username, accountname, access and error
func StartServer ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.