Skip to content

Commit

Permalink
new auth callback support
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed May 30, 2016
1 parent c9592c4 commit 1b1a614
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/paypal/base.py
Expand Up @@ -74,6 +74,10 @@ def __init__(self, *args, **kwargs):
self.client_secret = kwargs.get("client_secret", self.client_secret)
self.access_token = kwargs.get("access_token", None)

def auth_callback(self, params, headers):
self.oauth_token()
headers["Authorization"] = "Bearer %s" % self.get_access_token()

def oauth_token(self, grant_type = "client_credentials"):
url = self.base_url + "oauth2/token"
token = appier.http._authorization(self.client_id, self.client_secret)
Expand Down

0 comments on commit 1b1a614

Please sign in to comment.