-
-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
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
AuthenticationBackend - requires Failing with "IndexError: tuple index out of range" #567
Comments
@mthipparthi getting this error too, did you work around it or do you know if the Starlette maintainers will work on this? If you understand the issue enough to explain it to me, I can make a PR. |
@mthipparthi @cesarferradas Make it 3 ... im a little disheartened that I am coming across this issue months down the road and there doesn't seem to be a resolution. Short of copy-pasting the decorator and removing the |
Is this issue still valid? Can someone confirm? |
Thanks :) |
Issue: requires giving IndexError: tuple index out of range error.
reason : args will not present when we use synchronous decorators
Fix: args, idx wont be avilable in synchronous decorators, it should be removed from that check.
Test Code:
`
@router.post(
"/v1/ns/user-subscriptions", status_code=HTTP_201_CREATED, response_model=SubscriptionsResponse
)
@requires("authenticated")
def create_subscription(request: Request, l_request: SubscriptionsRequest):
# validate_auth_token(g_request)
`
The text was updated successfully, but these errors were encountered: