update
This commit is contained in:
@ -23,7 +23,7 @@ func NewAuthHandler(auth service.AuthService) *AuthHandler {
|
||||
|
||||
// Me 当前登录用户,需 Authorization: Bearer <token>。
|
||||
//
|
||||
// GET /api/auth/me
|
||||
// GET /api/v1/me(旧别名 /api/v1/auth/me 已废弃)
|
||||
// 成功:200 { user }
|
||||
func (h *AuthHandler) Me(c *gin.Context) {
|
||||
userID, ok := middleware.UserIDFrom(c)
|
||||
@ -86,7 +86,7 @@ func (h *AuthHandler) Refresh(c *gin.Context) {
|
||||
|
||||
// Logout 吊销当前 refresh token(单设备登出)。
|
||||
//
|
||||
// POST /api/auth/logout
|
||||
// DELETE /api/v1/auth/sessions/current(旧别名 POST /api/v1/auth/logout 已废弃)
|
||||
// body: { refresh_token }
|
||||
// 成功:200 { ok: true }
|
||||
func (h *AuthHandler) Logout(c *gin.Context) {
|
||||
@ -105,7 +105,7 @@ func (h *AuthHandler) Logout(c *gin.Context) {
|
||||
|
||||
// LogoutAll 吊销当前用户全部 refresh token(踢下线 / 全设备登出)。
|
||||
//
|
||||
// POST /api/auth/logout-all
|
||||
// DELETE /api/v1/auth/sessions(旧别名 POST /api/v1/auth/logout-all 已废弃)
|
||||
// body: { refresh_token }
|
||||
// 成功:200 { revoked: <受影响行数> }
|
||||
func (h *AuthHandler) LogoutAll(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user