omab / python-social-auth

Social auth made simple
http://psa.matiasaguirre.net
BSD 3-Clause "New" or "Revised" License
2.83k stars 1.09k forks source link

Storing token_type in extra_data field when using OAuth 2.0 #912

Closed clintonb closed 8 years ago

clintonb commented 8 years ago

This value is useful for authentication servers (AS) that may provide multiple types of tokens. Most servers use the Bearer token type; however, we at @edx are transitioning to using JWT. The ability to make the switch without having to change our backend would be ideal. Storing the token type means we can avoid hardcoding the value and let the access token response determine which scheme is used for future requests made using the issued token.

clintonb commented 8 years ago

@omab please review. FYI @bderusha @nasthagiri @jcdyer

clintonb commented 8 years ago

@omab any feedback?

omab commented 8 years ago

@clintonb thanks for this PR, I've merged it but ran PEP8 on it first.

clintonb commented 8 years ago

Thanks @omab!