Rework Token API comments #15162

Merged
ianw merged 3 commits from token-api-doc into main 2021-05-16 13:51:53 +00:00
ianw commented 2021-03-25 22:32:53 +00:00 (Migrated from github.com)

Move the token API discussion into a common section discussing the
generation and listing of the tokens. Add a note on the display of
the sha1 during creation and listing.

Move the token API discussion into a common section discussing the generation and listing of the tokens. Add a note on the display of the sha1 during creation and listing.
noerw (Migrated from github.com) requested changes 2021-05-14 14:02:44 +00:00
noerw (Migrated from github.com) commented 2021-05-14 14:02:14 +00:00

Reword so it's clearer that this is only for 2FA. And we don't need to hint at changes from 1.8, released in 2019 anymore ;)

To use the API with basic authentication with two factor authentication
enabled, you'll need to send an additional header that contains the one
time password (6 digitrotating token).
An example of the header is `X-Gitea-OTP: 123456` where `123456`
is where you'd place the code from your authenticator.
Here is how the request would look like in curl:
Reword so it's clearer that this is only for 2FA. And we don't need to hint at changes from 1.8, released in 2019 anymore ;) ```suggestion To use the API with basic authentication with two factor authentication enabled, you'll need to send an additional header that contains the one time password (6 digitrotating token). An example of the header is `X-Gitea-OTP: 123456` where `123456` is where you'd place the code from your authenticator. Here is how the request would look like in curl: ```
@ -45,1 +76,4 @@
You can also create an API key token via your Gitea installation's web
interface: `Settings | Applications | Generate New Token`.
noerw (Migrated from github.com) commented 2021-05-14 14:00:27 +00:00

I'd put this first in this section as it is very short, and doesn't get lost in the API noise ;)

I'd put this first in this section as it is very short, and doesn't get lost in the API noise ;)
6543 (Migrated from github.com) approved these changes 2021-05-16 07:31:57 +00:00
noerw (Migrated from github.com) approved these changes 2021-05-16 13:26:40 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#15162
No description provided.