MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / Logout

Method Logout

internal/api/user.go:119–126  ·  view source on GitHub ↗

Logout 用户登出

(ctx *gin.Context)

Source from the content-addressed store, hash-verified

117
118// Logout 用户登出
119func (uh *UserHandler) Logout(ctx *gin.Context) {
120 if err := uh.ijwt.ClearToken(ctx); err != nil {
121 apiresponse.ErrorWithMessage(ctx, UserLogoutFailure)
122 return
123 }
124
125 apiresponse.Success(ctx)
126}
127
128// RefreshToken 刷新令牌
129func (uh *UserHandler) RefreshToken(ctx *gin.Context) {

Callers

nothing calls this directly

Calls 3

ErrorWithMessageFunction · 0.92
SuccessFunction · 0.92
ClearTokenMethod · 0.65

Tested by

no test coverage detected