邀请码获取
Get an Invitation Code
当前 Orange Studio 处于内部测试阶段,注册需要使用邀请码。
Currently, Orange Studio is in an internal testing phase, and registration requires an invitation code.
您可以通过以下方式联系我们获取邀请码:
You can contact us to obtain an invitation code through the following method:
QQ: 241361928
功能开发进度
Feature Development Progress
我们正在不断开发和完善 Orange Studio 的各项功能。您可以在我们的主页查看到各个生态系统的规划状态。
We are continuously developing and improving the features of Orange Studio. You can view the planning status of various ecosystems on our homepage.
对于已上线的服务,部分功能的开发进度可能会在前端页面中以数值形式体现。请注意,这些数值仅供参考,您可以通过浏览器开发者工具修改这些前端数值来模拟和查看不同进度下的页面效果(仅限测试用途)。
For services that are already live, the development progress of some features may be represented as numerical values on the frontend. Please note that these values are for reference only. You can use browser developer tools to modify these frontend values to simulate and view page effects at different progress stages (for testing purposes only).
OAuth 2.0 概述
OAuth 2.0 Overview
Orange ID 使用 OAuth 2.0 协议作为行业标准授权框架。它允许第三方应用在不获取用户密码的情况下,安全地访问用户在 Orange Studio 的部分数据。
Orange ID uses the OAuth 2.0 protocol as the industry-standard authorization framework. It enables third-party applications to securely access a user's data within Orange Studio without obtaining their password.
我们支持最常用且安全的**授权码流程 (Authorization Code Flow)**。此流程确保了用户的凭据始终安全,并且访问令牌不会直接暴露给用户的浏览器。
We support the most common and secure Authorization Code Flow. This flow ensures that the user's credentials remain secure and that access tokens are not directly exposed to the user's browser.
授权流程
Authorization Flow
整个授权流程分为以下几个步骤:
The entire authorization flow is divided into the following steps:
- 用户发起授权: 您的应用将用户重定向到 Orange ID 的授权页面,并附上应用的 `client_id` 和请求的权限 `scope`。
- User Initiates Authorization: Your application redirects the user to the Orange ID authorization page, including your app's `client_id` and the requested `scope`.
- 用户同意授权: 用户在 Orange ID 页面登录并同意向您的应用授权。
- User Grants Consent: The user logs in on the Orange ID page and agrees to grant authorization to your application.
- 获取授权码: Orange ID 将用户重定向回您应用预设的 `redirect_uri`,并在 URL 中附带一个临时的授权码 `code`。
- Receive Authorization Code: Orange ID redirects the user back to your application's pre-configured `redirect_uri`, including a temporary authorization `code` in the URL.
- 交换访问令牌: 您的应用后端使用 `code`、`client_id` 和 `client_secret` 向 Orange ID 的令牌端点发起请求,换取 `access_token`。
- Exchange for Access Token: Your application's backend uses the `code`, `client_id`, and `client_secret` to make a request to the Orange ID token endpoint in exchange for an `access_token`.
- 访问受保护资源: 您的应用使用 `access_token` 访问 Orange ID 的 API,获取用户信息。
- Access Protected Resources: Your application uses the `access_token` to access the Orange ID API and retrieve user information.
端点与参数
Endpoints and Parameters
1. 授权端点 (Authorization Endpoint)
1. Authorization Endpoint
您的应用需要将用户浏览器重定向到此 URL 以开始授权流程。
Your application needs to redirect the user's browser to this URL to start the authorization process.
GET https://orangestudiocn.top/id/authorize
请求参数 (Query Parameters)
Request Parameters (Query Parameters)
参数 | 类型 | 描述 |
response_type | String | 必须为 code 。 | Must be code . |
client_id | String | 您在开发者中心注册应用后获得的客户端ID。 | The client ID you received after registering your application in the developer center. |
redirect_uri | String | 用户授权后重定向回的URL。必须与您在应用设置中配置的回调URL完全匹配。 | The URL to redirect back to after user authorization. Must exactly match one of the callback URLs configured in your application settings. |
scope | String | (可选) 以空格分隔的权限范围列表。例如 profile email 。 | (Optional) A space-delimited list of scopes. E.g., profile email . |
state | String | (推荐) 一个随机字符串,用于防止CSRF攻击。该值将在回调时原样返回。 | (Recommended) A random string used to prevent CSRF attacks. This value will be returned as is in the callback. |
2. 令牌端点 (Token Endpoint)
2. Token Endpoint
您的应用后端使用授权码向此端点请求访问令牌。
Your application backend requests an access token from this endpoint using the authorization code.
POST https://api.orangestudiocn.top/api/v1/oauth/token
请求参数 (Form Data)
Request Parameters (Form Data)
参数 | 类型 | 描述 |
grant_type | String | 必须为 authorization_code 。 | Must be authorization_code . |
code | String | 从授权端点回调中获取的授权码。 | The authorization code received from the authorization endpoint callback. |
redirect_uri | String | 必须与第一步中使用的 redirect_uri 完全一致。 | Must be identical to the redirect_uri used in the first step. |
client_id | String | 您的客户端ID。 | Your client ID. |
client_secret | String | 您的客户端密钥。此参数必须在后端安全地存储和使用。 | Your client secret. This parameter must be stored and used securely on the backend. |
权限范围 (Scopes)
Scopes
Scope 用于指定您的应用希望访问用户哪些信息。在发起授权请求时,您可以通过 scope
参数请求一个或多个权限。用户将在授权页面看到您的应用请求的权限列表。
Scopes are used to specify what information your application wants to access. When initiating an authorization request, you can request one or more permissions via the scope
parameter. The user will see the list of permissions your application is requesting on the authorization page.
可用 Scopes
Available Scopes
Scope | 描述 |
profile | 获取用户的基本公开信息,如昵称、@用户名和头像链接。 | Access the user's basic public information, such as nickname, @username, and avatar URL. |
email | 获取用户的电子邮箱地址。 | Access the user's email address. |