Files
Memoh/assets/zh_concepts_identity-and-binding.md.B6I6pSqI.js
T
2026-02-25 07:57:19 +00:00

2 lines
3.2 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as o,o as e,c as a,ag as i}from"./chunks/framework.ePeAWSvT.js";const u=JSON.parse('{"title":"账号模型与绑定","description":"","frontmatter":{},"headers":[],"relativePath":"zh/concepts/identity-and-binding.md","filePath":"zh/concepts/identity-and-binding.md","lastUpdated":1770887583000}'),l={name:"zh/concepts/identity-and-binding.md"};function n(r,t,d,s,c,h){return e(),a("div",null,[...t[0]||(t[0]=[i('<h1 id="账号模型与绑定" tabindex="-1">账号模型与绑定 <a class="header-anchor" href="#账号模型与绑定" aria-label="Permalink to &quot;账号模型与绑定&quot;"></a></h1><h2 id="账号模型" tabindex="-1">账号模型 <a class="header-anchor" href="#账号模型" aria-label="Permalink to &quot;账号模型&quot;"></a></h2><p>Memoh 将平台账号与系统账号视为两类不同实体:</p><ul><li><strong>平台账号(<code>ChannelIdentity</code></strong> 是用户在外部接入平台上的账号(例如飞书账号),不是 Memoh 内部账号。</li><li><strong>系统账号(<code>User</code></strong> 是 Memoh 系统内账号。</li></ul><p>平台账号在初始阶段可以不绑定系统账号。<br><code>bind</code> 的职责是完成这两类账号的关联。</p><h2 id="接入平台与-bot" tabindex="-1">接入平台与 Bot <a class="header-anchor" href="#接入平台与-bot" aria-label="Permalink to &quot;接入平台与 Bot&quot;"></a></h2><ul><li><strong>接入平台(<code>channel</code></strong> 是入站消息来源。</li><li><strong>Bot</strong> 是系统内的授权与资源边界。</li></ul><p>Bot 由系统账号管理,入站消息由平台账号产生。</p><h2 id="为什么账号绑定是账号作用域" tabindex="-1">为什么账号绑定是账号作用域 <a class="header-anchor" href="#为什么账号绑定是账号作用域" aria-label="Permalink to &quot;为什么账号绑定是账号作用域&quot;"></a></h2><p>账号绑定的目标是建立账号归属关系,而不是直接发放 bot 资源权限:</p><ul><li>它只负责平台账号与系统账号的绑定;</li><li>不把账号绑定与成员管理语义耦合在一起;</li><li>让 bot 访问控制保持独立、可演进。</li></ul><h2 id="账号绑定流程-当前共识" tabindex="-1">账号绑定流程(当前共识) <a class="header-anchor" href="#账号绑定流程-当前共识" aria-label="Permalink to &quot;账号绑定流程(当前共识)&quot;"></a></h2><ol><li>用户以自己的系统账号申请 bind code</li><li>平台账号在支持的接入平台会话中发送 code</li><li>系统校验 code,完成平台账号到系统账号的绑定;</li><li>bot 成员与授权由独立流程处理。</li></ol><h2 id="bot-类型语义" tabindex="-1">Bot 类型语义 <a class="header-anchor" href="#bot-类型语义" aria-label="Permalink to &quot;Bot 类型语义&quot;"></a></h2><ul><li><strong>Public bot</strong>:支持成员协作语义。</li><li><strong>Personal bot</strong>:语义上应为单 owner,不应依赖成员机制。</li></ul><blockquote><p>注:本文档记录的是产品语义与共识方向。<br> 部分运行时细节仍可能处于收敛阶段。</p></blockquote>',16)])])}const p=o(l,[["render",n]]);export{u as __pageData,p as default};