casdoor

package
v0.0.0-...-5a3ce9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CASDOOR_JWT_COOKIE_NAME = "casdoorAuthToken"
)

Variables

This section is empty.

Functions

func CheckAuthorizationBearer

func CheckAuthorizationBearer(c *fiber.Ctx) (string, bool)

检查请求头里面是否有Authorization Bearer

func CheckCookie

func CheckCookie(c *fiber.Ctx) (string, bool)

检查cookie里面是否有CASDOOR_JWT_COOKIE_NAME

func CheckLoginToken

func CheckLoginToken(c *fiber.Ctx) (string, error)

检查是否有登录

func CheckUserInfo

func CheckUserInfo(c *fiber.Ctx, UserKeyName string) error

访问casdoor服务检查token是否过期,并且获取用户信息

func InitCasdoorConfig

func InitCasdoorConfig()

func ParseJwtToken

func ParseJwtToken(c *fiber.Ctx) (*casdoorsdk.Claims, error)

检测是否有登录,并且解析token

func SigninHandler

func SigninHandler(c *fiber.Ctx) error

func UserinfoHandler

func UserinfoHandler(c *fiber.Ctx) error

获取用户信息

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL