Documentation ¶
Index ¶
- func CheckRolePresent(roles []string, roleToFind string) bool
- func GetClientIdFromJwt(claims jwt.MapClaims) string
- func GetCurrentLoggedUserEmailFromJwt(claims jwt.MapClaims) string
- func GetCurrentLoggedUserUUIDFromJwt(claims jwt.MapClaims) string
- func GetCustomerIdFromJwt(claims jwt.MapClaims) int
- func GetCustomerNameFromJwt(claims jwt.MapClaims) string
- func GetRolesListFromJwt(claims jwt.MapClaims) ([]string, error)
- func JwtProtected(publicKey string) fiber.Handler
- func RoleCheck(rolesToCheck []string) fiber.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRolePresent ¶
func GetClientIdFromJwt ¶
func GetClientIdFromJwt(claims jwt.MapClaims) string
func GetCurrentLoggedUserEmailFromJwt ¶
func GetCurrentLoggedUserEmailFromJwt(claims jwt.MapClaims) string
get current logged in user email (username) from jwt
func GetCurrentLoggedUserUUIDFromJwt ¶
func GetCurrentLoggedUserUUIDFromJwt(claims jwt.MapClaims) string
get current logged in user email (username) from jwt
func GetCustomerIdFromJwt ¶
func GetCustomerIdFromJwt(claims jwt.MapClaims) int
get current customer_id from jwt
func GetCustomerNameFromJwt ¶
func GetCustomerNameFromJwt(claims jwt.MapClaims) string
get current customer from jwt
func GetRolesListFromJwt ¶
func JwtProtected ¶
func JwtProtected(publicKey string) fiber.Handler
JwtProtected wrap http handler functions for jwt verification
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.