Skip to content

Commit

Permalink
new extra header fo oauth 2
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Dec 11, 2014
1 parent 8283dd1 commit bf336b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/appier/api.py
Expand Up @@ -277,6 +277,7 @@ def build(self, method, url, headers, kwargs):
if not self.is_oauth(): return
token = kwargs.get("token", True)
if token: kwargs["access_token"] = self.get_access_token()
if token: headers["Authorization"] = "Bearer %s" % self.get_access_token()
if "token" in kwargs: del kwargs["token"]

def get_access_token(self):
Expand Down

0 comments on commit bf336b5

Please sign in to comment.