auth
feishu.gateway.auth
¶
ServiceAuthError
¶
ServiceCapabilityError
¶
require_service
¶
校验 Authorization: Bearer <key> 并返回对应的服务名。
源代码位于: feishu/gateway/auth.py
require_service_capability
¶
Python
require_service_capability(request: Request, service_keys: Mapping[str, str], service_capabilities: Mapping[str, Collection[str]]) -> str
Validate a bearer key and, when configured, its route capability.
Empty capability configuration preserves the legacy authenticated gateway behavior. Once an ACL is configured, every service must have an explicit route capability and unmatched requests are denied.