Expand description
Task-local auth identity context.
Before dispatching a tools/call, resources/read, or prompts/get
request, core.rs calls scope to set the current identity for that
async task. Handler code retrieves it via current (or through the
Auth extractor, which calls current internally).
Using a task-local means:
ToolHandlerFnsignatures stay unchanged — no breaking API change.- Concurrently running handlers in different tasks each see their own identity.
- The overhead is a single
tokio::task_local!lookup per extractor use.