From 7ac6529e0ad330adba44a94908fa5e9d82ee2f7a Mon Sep 17 00:00:00 2001 From: Steve Shipway Date: Wed, 4 Mar 2020 17:34:01 +1300 Subject: [PATCH] Corrections to Azure auth service definition after refactor --- powerdnsadmin/services/azure.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/powerdnsadmin/services/azure.py b/powerdnsadmin/services/azure.py index 6f6eeeb..46fb1af 100644 --- a/powerdnsadmin/services/azure.py +++ b/powerdnsadmin/services/azure.py @@ -11,6 +11,10 @@ def azure_oauth(): def fetch_azure_token(): return session.get('azure_token') + def update_token(token): + session['azure_token'] = token + return token + azure = authlib_oauth_client.register( 'azure', client_id=Setting().get('azure_oauth_key'), @@ -33,6 +37,6 @@ def azure_oauth(): return 'Access denied: reason=%s error=%s' % ( request.args['error'], request.args['error_description']) session['azure_token'] = (token) - return redirect(url_for('.login', _external=True, _scheme='https')) + return redirect(url_for('index.login', _external=True, _scheme='https')) return azure