Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Conversation

marccerrato
Copy link

I've added the tests to validate the compatibility problem between JWT Auth and OAuth2, which I commented on the issue #3.

I have also used Tox to make it possible to run the tests with the extra requirement of django-oauth2-provider without altering the base requirements of the package.

@jpadilla
Copy link
Owner

@marccerrato thank you so much for this! I'll try and take a closer look today and see what I can come up with. Any other recommendations apart from using something other than "Bearer"?

@marccerrato
Copy link
Author

@jpadilla I think the best and easier solution is to use another keyword, like "JWT", since in the draft (http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-15) is not specified which term to use, and maybe "Bearer" should only be used for OAuth.

Another choice, it's to validate the token format to distinguish from the OAuth2 one, but it should require changing the DRF OAuth2Authentication class as well.

@gcollazo
Copy link
Contributor

I agree with changing the header from "Bearer" to "JWT"

jpadilla added a commit that referenced this pull request Jan 22, 2014
Added tests to validate JWT Auth compatibility with OAuth2
@jpadilla jpadilla merged commit e1e6aa3 into jpadilla:master Jan 22, 2014
@bharathibh
Copy link

@marccerrato nice dude

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

Successfully merging this pull request may close these issues.

4 participants