This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
wangwei
/
aiforge
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
128
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Add TOTP header to Swagger Documentation (
#12402
)
tags/v1.13.0-rc1
6543
GitHub
5 years ago
parent
c1df839a6b
commit
680b37d97c
2 changed files
with
15 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
routers/api/v1/api.go
+9
-0
templates/swagger/v1_json.tmpl
+ 6
- 0
routers/api/v1/api.go
View File
@@ -27,6 +27,7 @@
// - AuthorizationHeaderToken :
// - SudoParam :
// - SudoHeader :
// - TOTPHeader :
//
// SecurityDefinitions:
// BasicAuth:
@@ -54,6 +55,11 @@
// name: Sudo
// in: header
// description: Sudo API request as the user provided as the key. Admin privileges are required.
// TOTPHeader:
// type: apiKey
// name: X-GITEA-OTP
// in: header
// description: Must be used in combination with BasicAuth if two-factor authentication is enabled.
//
// swagger:meta
package v1
+ 9
- 0
templates/swagger/v1_json.tmpl
View File
@@ -15551,6 +15551,12 @@
"name": "sudo",
"in": "query"
},
"TOTPHeader": {
"description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.",
"type": "apiKey",
"name": "X-GITEA-OTP",
"in": "header"
},
"Token": {
"type": "apiKey",
"name": "token",
@@ -15575,6 +15581,9 @@
},
{
"SudoHeader": []
},
{
"TOTPHeader": []
}
]
}
Write
Preview
Loading…
Cancel
Save