- 拆分 web.rs 为 web/ 子模块;统一 client_ip 提取 - core: user_scope SQL 复用、env_map N+1 消除、FETCH_ALL 上限调整 - entries 列表页并行查询;PgPool 去 Arc;结构化 NotFound 等错误 - CI: SSH 私钥安全写入;crypto/hex 与依赖清理;MCP 输入长度校验 - AGENTS: API Key 明文存储设计说明
19 lines
783 B
Rust
19 lines
783 B
Rust
use super::{OAuthConfig, OAuthUserInfo};
|
|
/// WeChat OAuth — not yet implemented.
|
|
///
|
|
/// This module is a placeholder for future WeChat Open Platform integration.
|
|
/// When ready, implement `exchange_code` following the non-standard WeChat OAuth 2.0 flow:
|
|
/// - Token exchange uses a GET request (not POST)
|
|
/// - Preferred user identifier is `unionid` (cross-app), falling back to `openid`
|
|
/// - Docs: https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
|
|
use anyhow::{Result, bail};
|
|
|
|
#[allow(dead_code)] // Placeholder — implement when WeChat login is needed.
|
|
pub async fn exchange_code(
|
|
_client: &reqwest::Client,
|
|
_config: &OAuthConfig,
|
|
_code: &str,
|
|
) -> Result<OAuthUserInfo> {
|
|
bail!("WeChat login is not yet implemented")
|
|
}
|