Skip to content

Fixed authentication chain issue #15

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

lucmir
Copy link

@lucmir lucmir commented Apr 7, 2016

Authenticate method was raising AuthenticationFailed exception if the provided value for Authorization header does not match signature regular expression. It is ok if SignatureAuthentication is being used alone, but in an authentication chain, if another authentication class after SignatureAuthentication also uses Authorization header (for example TokenAuthentication) it will not work (AuthenticationFailed exception will break the chain).

I have changed authenticate method to return None if provided value for Authorization header does not match signature regular expression, allowing the next authentication class in the chain to handle it. AuthenticationFailed should be raised only if a wrong signature value is provided.

I updated test_bad_signature and added test_no_signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant