Oauth for Google API example using Python / Django

前端 未结 6 456
傲寒
傲寒 2021-01-30 05:11

I am trying to get Oauth working with the Google API using Python. I have tried different oauth libraries such as oauth, oauth2 and djanog-oauth but I cannot get it to work (inc

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 06:00

    This may be the answer.

    When calling OAuthGetRequestToken you sign the base_string with your consumer_secret followed by an & (ampersand)

    When calling OAuthGetAccessToken you sign the base_string with your consumer_secret followed by an & (ampersand) followed by token_secret.

    You would sign the base_string using (consumer_secret + "&") for OAuthGetRequestToken and you would sign the base_string using (consumer_secret + "&" + token_secret) for OAuthGetAccessToken

    http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iii-security-architecture/ In the PLAINTEXT and HMAC-SHA1 methods, the shared secret is the combination of the Consumer Secret and Token Secret.

提交回复
热议问题