зеркало из https://github.com/mozilla/riskHeatMap.git
clean up
This commit is contained in:
Родитель
b51312c5d5
Коммит
6c32cee8f4
17
app.py
17
app.py
|
@ -36,29 +36,16 @@ if os.environ.get('LOGGING') == 'True':
|
|||
|
||||
# config
|
||||
logger.info("Choosing config")
|
||||
if os.environ.get('ENVIRONMENT') == 'Production':
|
||||
# Only cloudwatch log when app is in production mode.
|
||||
#handler = watchtower.CloudWatchLogHandler()
|
||||
handler = logging.StreamHandler()
|
||||
if 'prod' in os.environ.get('ENVIRONMENT').lower():
|
||||
logger.info("Using production config")
|
||||
app.logger.addHandler(handler)
|
||||
app.config.from_object(config.ProductionConfig())
|
||||
else:
|
||||
# Only log flask debug in development mode.
|
||||
logger.info("Using development config")
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
handler = logging.StreamHandler()
|
||||
logging.getLogger("werkzeug").addHandler(handler)
|
||||
app.config.from_object(config.DevelopmentConfig())
|
||||
|
||||
|
||||
#auth = OIDCAuthentication(app,client_registration_info=client_info)
|
||||
#old
|
||||
# oidc_config = config.OIDCConfig()
|
||||
# authentication = auth.OpenIDConnect(
|
||||
# oidc_config
|
||||
# )
|
||||
# oidc = authentication.auth(app)
|
||||
# setup oidc
|
||||
oidc_config = config.OIDCConfig()
|
||||
auth0_Config=ProviderConfiguration(issuer='https://{}'.format(oidc_config.OIDC_DOMAIN),
|
||||
client_metadata=ClientMetadata(oidc_config.OIDC_CLIENT_ID,oidc_config.OIDC_CLIENT_SECRET)
|
||||
|
|
Загрузка…
Ссылка в новой задаче