Documentation
¶
Index ¶
- Constants
- func CheckAuthorizationBearer(c *fiber.Ctx) (string, bool)
- func CheckCookie(c *fiber.Ctx) (string, bool)
- func CheckLoginToken(c *fiber.Ctx) (string, error)
- func CheckUserInfo(c *fiber.Ctx, UserKeyName string) error
- func InitCasdoorConfig()
- func ParseJwtToken(c *fiber.Ctx) (*casdoorsdk.Claims, error)
- func SigninHandler(c *fiber.Ctx) error
- func UserinfoHandler(c *fiber.Ctx) error
Constants ¶
View Source
const (
CASDOOR_JWT_COOKIE_NAME = "casdoorAuthToken"
)
Variables ¶
This section is empty.
Functions ¶
func CheckAuthorizationBearer ¶
检查请求头里面是否有Authorization Bearer
func CheckCookie ¶
检查cookie里面是否有CASDOOR_JWT_COOKIE_NAME
func CheckUserInfo ¶
访问casdoor服务检查token是否过期,并且获取用户信息
func InitCasdoorConfig ¶
func InitCasdoorConfig()
func SigninHandler ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.