mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-29 22:31:28 +00:00
Adds a /api/v1/token endpoint that allows tokens to introspect and delete themselves. partially fixes: https://github.com/go-gitea/gitea/issues/33583 Assisted-by: Mistral Vibe:mistral-medium-3.5 --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
30 lines
706 B
Go
30 lines
706 B
Go
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package swagger
|
|
|
|
import (
|
|
api "gitea.dev/modules/structs"
|
|
)
|
|
|
|
// OAuth2Application
|
|
// swagger:response OAuth2Application
|
|
type swaggerResponseOAuth2Application struct {
|
|
// in:body
|
|
Body api.OAuth2Application `json:"body"`
|
|
}
|
|
|
|
// AccessToken represents an API access token.
|
|
// swagger:response AccessToken
|
|
type swaggerResponseAccessToken struct {
|
|
// in:body
|
|
Body api.AccessToken `json:"body"`
|
|
}
|
|
|
|
// CurrentAccessToken represents the currently authenticated access token.
|
|
// swagger:response CurrentAccessToken
|
|
type swaggerResponseCurrentAccessToken struct {
|
|
// in:body
|
|
Body api.CurrentAccessToken `json:"body"`
|
|
}
|