current_authed_key

Function current_authed_key 

Source
fn current_authed_key(state: &ServerState) -> Option<Arc<KeyRecord>>
Expand description

从 KeyStore 里按 id 取当前的 KeyRecord(对齐 SIGHUP 热重载)。

如果 startup 时的 authed_key 已被 remove_key 删掉,返回 None → 调用方拒绝。 否则返回存储中最新版的 KeyRecord(scope / limits / expires_at 全新鲜)。