Showing
1 changed file
with
6 additions
and
0 deletions
| ... | @@ -45,6 +45,12 @@ const safeParse = (text) => { | ... | @@ -45,6 +45,12 @@ const safeParse = (text) => { |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | /** | 47 | /** |
| 48 | + * 如果你后续要支持“多个外部供应商”,推荐的扩展方式是: | ||
| 49 | + * 在 auth_user_info.js 里把 user_info 结构升级为 { provider, credential } 或者分 key 存(如 user_info_vendorA / user_info_vendorB ), | ||
| 50 | + * 然后让 getAuthHeadersFromUserInfo() 根据 provider 生成不同头——这样全项目只有一个地方需要知道供应商差异。 | ||
| 51 | + */ | ||
| 52 | + | ||
| 53 | +/** | ||
| 48 | * 从存储中获取用户信息 | 54 | * 从存储中获取用户信息 |
| 49 | * @param {*} options 选项对象,包含 storage 字段 | 55 | * @param {*} options 选项对象,包含 storage 字段 |
| 50 | * @returns 如果用户信息存在且有效,则返回用户信息对象;否则返回 null | 56 | * @returns 如果用户信息存在且有效,则返回用户信息对象;否则返回 null | ... | ... |
-
Please register or login to post a comment