summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-08-05 17:05:57 +0300
committerLars Wirzenius <liw@liw.fi>2018-08-05 17:05:57 +0300
commit5b24f59a5e502ebf4c4a53903cd43c483a869ac0 (patch)
tree9af58a2fcd51b1c9a1aaf82073a3a6075d0928e4
parent61a24dd134bb6c69ccec713a77f7d855e0045cc0 (diff)
downloadickweb-5b24f59a5e502ebf4c4a53903cd43c483a869ac0.tar.gz
Fix: retrieving token URL
-rw-r--r--ickweb/app.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ickweb/app.py b/ickweb/app.py
index 25d9ed1..db1a29d 100644
--- a/ickweb/app.py
+++ b/ickweb/app.py
@@ -103,14 +103,14 @@ def create_app(our_url, controller, client_secret):
print('/callback called')
code = bottle.request.query['code']
print('code:', repr(code))
- path = '/token'
+ token_url = '{}/token'.format(api_url)
params = {
'grant_type': 'authorization_code',
'code': code,
}
auth = (client_id, client_secret)
print('requesting token')
- r = api.POST(path, params, auth)
+ r = api.POST(token_url, params, auth)
print('r:', repr(r))
obj = r.json()
token = obj['access_token']