master
TuxCoder 2020-06-21 13:58:57 +02:00
parent 04ecd27532
commit cc153ab05c
2 changed files with 6 additions and 6 deletions

View File

@ -51,7 +51,7 @@ def init_app(name=None):
#init hydra admin api
hydra_config = hydra.Configuration(
app.config['HYDRA_ADMIN_URL'],
host=app.config['HYDRA_ADMIN_URL'],
username=app.config['HYDRA_ADMIN_USER'],
password=app.config['HYDRA_ADMIN_PASSWORD'])
hydra_client = hydra.ApiClient(hydra_config)

View File

@ -40,11 +40,11 @@ def consent():
consent_request = current_app.hydra_api.get_consent_request(
request.args['consent_challenge'])
except ory_hydra_client.exceptions.ApiValueError:
logger.info(f' ory exception {e}')
#return redirect(url_for('frontend.index'))
except ory_hydra_client.exceptions.ApiException as e:
logger.fatal(f'ory exception {e}',e)
raise e
logger.info('ory exception - could not fetch user data ApiValueError')
return redirect(url_for('frontend.index'))
except ory_hydra_client.exceptions.ApiException:
logger.exception('ory exception - could not fetch user data')
return redirect(url_for('frontend.index'))
requested_scope = consent_request.requested_scope
requested_audiences = consent_request.requested_access_token_audience