This commit is contained in:
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 #init hydra admin api
hydra_config = hydra.Configuration( hydra_config = hydra.Configuration(
app.config['HYDRA_ADMIN_URL'], host=app.config['HYDRA_ADMIN_URL'],
username=app.config['HYDRA_ADMIN_USER'], username=app.config['HYDRA_ADMIN_USER'],
password=app.config['HYDRA_ADMIN_PASSWORD']) password=app.config['HYDRA_ADMIN_PASSWORD'])
hydra_client = hydra.ApiClient(hydra_config) hydra_client = hydra.ApiClient(hydra_config)

View file

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