mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-28 13:01:04 +00:00 
			
		
		
		
	
					parent
					
						
							
								c8b189eb01
							
						
					
				
			
			
				commit
				
					
						b159ebbab7
					
				
			
		
					 70 changed files with 111 additions and 111 deletions
				
			
		|  | @ -21,7 +21,7 @@ menu: | |||
| 
 | ||||
| By default, `ENABLE_SWAGGER` is true, and | ||||
| `MAX_RESPONSE_ITEMS` is set to 50. See [Config Cheat | ||||
| Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) for more | ||||
| Sheet](administration/config-cheat-sheet.md) for more | ||||
| information. | ||||
| 
 | ||||
| ## Authentication | ||||
|  | @ -76,7 +76,7 @@ interface: `Settings | Applications | Generate New Token`. | |||
| 
 | ||||
| ## OAuth2 Provider | ||||
| 
 | ||||
| Access tokens obtained from Gitea's [OAuth2 provider](https://docs.gitea.io/en-us/oauth2-provider) are accepted by these methods: | ||||
| Access tokens obtained from Gitea's [OAuth2 provider](development/oauth2-provider.md) are accepted by these methods: | ||||
| 
 | ||||
| - `Authorization bearer ...` header in HTTP headers | ||||
| - `token=...` parameter in URL query string | ||||
|  |  | |||
|  | @ -20,7 +20,7 @@ menu: | |||
| ## 开启/配置 API 访问 | ||||
| 
 | ||||
| 通常情况下, `ENABLE_SWAGGER` 默认开启并且参数 `MAX_RESPONSE_ITEMS` 默认为 50。您可以从 [Config Cheat | ||||
| Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) 中获取更多配置相关信息。 | ||||
| Sheet](administration/config-cheat-sheet.md) 中获取更多配置相关信息。 | ||||
| 
 | ||||
| ## 通过 API 认证 | ||||
| 
 | ||||
|  |  | |||
|  | @ -137,7 +137,7 @@ For public clients, a redirect URI of a loopback IP address such as `http://127. | |||
| 
 | ||||
|    The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request. | ||||
| 
 | ||||
| 3. Use the `access_token` to make [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) to access the user's resources. | ||||
| 3. Use the `access_token` to make [API requests](development/api-usage.md#oauth2-provider) to access the user's resources. | ||||
| 
 | ||||
| ### Public client (PKCE) | ||||
| 
 | ||||
|  | @ -199,4 +199,4 @@ After you have generated this values, you can continue with your request. | |||
| 
 | ||||
|    The `REDIRECT_URI` in the `access_token` request must match the `REDIRECT_URI` in the `authorize` request. | ||||
| 
 | ||||
| 3. Use the `access_token` to make [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) to access the user's resources. | ||||
| 3. Use the `access_token` to make [API requests](development/api-usage.md#oauth2-provider) to access the user's resources. | ||||
|  |  | |||
|  | @ -134,4 +134,4 @@ Gitea 支持私密和公共客户端类型,[参见 RFC 6749](https://datatrack | |||
| 
 | ||||
|    `access_token` 请求中的 `REDIRECT_URI` 必须与 `authorize` 请求中的 `REDIRECT_URI` 相符。 | ||||
| 
 | ||||
| 3. 使用 `access_token` 来构造 [API 请求](https://docs.gitea.io/en-us/api-usage#oauth2) 以读写用户的资源。 | ||||
| 3. 使用 `access_token` 来构造 [API 请求](development/api-usage.md#oauth2-provider) 以读写用户的资源。 | ||||
|  |  | |||
|  | @ -93,4 +93,4 @@ Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意 | |||
| 
 | ||||
|    `access_token` 請求中的 `REDIRECT_URI` 必須符合 `authorize` 請求中的 `REDIRECT_URI`。 | ||||
| 
 | ||||
| 1. 發送 [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) 時使用 `access_token` 以存取使用者的資源。 | ||||
| 1. 發送 [API requests](development/api-usage.md#oauth2-provider) 時使用 `access_token` 以存取使用者的資源。 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue