Documentation ¶
Index ¶
- Constants
- func CheckAuthMiddlewareFunc(auth user2.Auth) gin.HandlerFunc
- func ClearCheckAuth()
- func Code() *code
- func GetAuthUser(ctx *gin.Context) (user2.User, error)
- func InitCheckAuth(svc *svc.Svc)
- func InitJWT(svc *svc.Svc) *jwt.GinJWTMiddleware
- func JWT() *jwt.GinJWTMiddleware
- type CheckAuth
- type CodeResp
- type JwtMapClaims
- type LoginRequest
Constants ¶
View Source
const IdentityKey = "UserDetail"
Variables ¶
This section is empty.
Functions ¶
func CheckAuthMiddlewareFunc ¶
func CheckAuthMiddlewareFunc(auth user2.Auth) gin.HandlerFunc
func ClearCheckAuth ¶
func ClearCheckAuth()
func InitCheckAuth ¶
func JWT ¶
func JWT() *jwt.GinJWTMiddleware
Types ¶
type JwtMapClaims ¶
type JwtMapClaims struct { Id uint `json:"id"` Auth user2.Auth `json:"auth"` Name string `json:"name"` EnName string `json:"enName"` LoginID string `json:"loginID"` CubeID string `json:"cubeID"` WcaID string `json:"wcaID"` DelegateName string `json:"delegateName"` }
func GetJwtUser ¶
func GetJwtUser(ctx *gin.Context) (JwtMapClaims, error)
Click to show internal directories.
Click to hide internal directories.