We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an allow_unauthorized option that does not bypass the middleware, but also does not raise NotAuthorized if auth fails.
allow_unauthorized
NotAuthorized
Discord thread
Route that returns the current authenticated user or None:
@get("/user", allow_unauthorized=True) async def get_user(request: Request) -> dict[str, User | None]: return {"user": request.user}
No response
Note
While we are open for sponsoring on GitHub Sponsors and OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
Add an
allow_unauthorized
option that does not bypass the middleware, but also does not raiseNotAuthorized
if auth fails.Discord thread
Basic Example
Route that returns the current authenticated user or None:
Drawbacks and Impact
No response
Unresolved questions
No response
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: