Commit 1d2a13be authored by echel0n's avatar echel0n

Added exception handling for grabbing token endpoint from auth server.

parent 17361b69
......@@ -17,7 +17,6 @@ class API(object):
self.api_url = ''
self.client_id =
self.client_secret =
self.token_url =['token_endpoint']
def session(self):
......@@ -61,6 +60,13 @@ class API(object):
'scope': value.scope if isinstance(value, OAuth2Token) else value.get('scope')
def token_url(self):
except requests.exceptions.RequestException:
return ""
def userinfo(self):
return self._request('GET', 'userinfo')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment