Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAllowedPermission ¶
func IsAllowedPermission(ctx context.Context, perms []permSchema.Permission, collect *mongo.Collection, auth *domain.Auth) (bool, error)
IsAllowedPermission allows to know if a permission is valid
func IsAllowedRole ¶
func IsAllowedRole(ctx context.Context, user *usersSchema.User, collect *mongo.Collection) ([]permSchema.Permission, bool, error)
IsAllowedRole allows to know if a role is valid or not and return all permission with relation
Types ¶
type Claims ¶
type Claims struct { Roles []string `json:"roles"` StandarClaims jwt.StandardClaims `json:"standard_claims"` }
func DecodeTokenJWT ¶
DecodeTokenJWT get the claims from a token valid
Click to show internal directories.
Click to hide internal directories.