Logically "Or"ed OAuth Scopes #11483
Unanswered
jeffsawatzky
asked this question in
Questions
Replies: 1 comment
-
I tried to implement what you want, but i didn't succeed. The only way I found is:
This produces openapi:
But I don't think it's usefull and somebody will use this approach.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
If I have an endpoint that requires the OAuth token to have either the "admin" scope OR "item:read" scope OR "all:read" scope, how would I express this with the
Security
andSecurityScopes
dependencies?The OAS spec seems to allow this
https://swagger.io/docs/specification/authentication/#multiple
And it would look something like this
OAI/OpenAPI-Specification#3001 (comment)
Thanks!
Operating System
macOS
Operating System Details
No response
FastAPI Version
0.110.1
Pydantic Version
1.10.15
Python Version
3.11
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions