Document ClientOAuthOptions.ScopeSelector usage
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- documentation
Direzione di ricerca
Inizia con la guida OAuth esistente e la documentazione XML di ClientOAuthOptions.ScopeSelector, quindi individua la posizione migliore per una sezione concettuale mirata. Il lavoro è completo quando vengono documentati il filtraggio, l’aggiunta di scopes specifici del client e la restituzione di null o di una sequenza vuota per omettere il parametro scope, con un piccolo esempio in C#.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
ClientOAuthOptions.ScopeSelector is a public API for customizing the OAuth scopes selected after the server-provided scope information has been resolved. It was added in #1596, but I couldn't find any conceptual documentation showing when or how to use it.
The XML documentation describes the API behavior, but users browsing the SDK documentation may not discover that ScopeSelector can be used to:
- filter scopes advertised by the server;
- append client-specific scopes when needed;
- return
nullor an empty sequence to omit thescopeparameter entirely.
A small conceptual example would make this behavior easier to discover, for example:
var oauthOptions = new ClientOAuthOptions
{
ScopeSelector = scopes =>
scopes?.Where(scope => scope is "mcp:tools" or "mcp:resources")
};
This would be especially useful alongside the existing OAuth guidance, where users may otherwise assume that Scopes is the only way to influence the requested scope set.
I also checked the currently open OAuth documentation work in #1801, which does not appear to cover ScopeSelector.
I'd be happy to submit a focused documentation PR for this and keep the change narrowly scoped to client-side scope selection, placing it wherever best fits the documentation structure.
[!NOTE]
This issue was prepared with AI assistance.
- Lingua principale
- C#
- Stelle
- 4.5k
- Fork
- 814
- Merge medio
- 9g 19h
- PR unite (30g)
- 4
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/csharp-sdk
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
modelcontextprotocol/csharp-sdk#1836 ·
-
enhancement needs confirmation
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
modelcontextprotocol/csharp-sdk#678 · 1 commento ·
-
enhancement needs confirmation P3 ready for work
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
modelcontextprotocol/csharp-sdk#515 · 6 commenti · 3 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
modelcontextprotocol/csharp-sdk#1881 ·
Tutte le issue di modelcontextprotocol/csharp-sdk
Issue simili
-
release-notes in .NET 11 RC2 Apertapriority-0
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
type/automation type/tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100