This commit is contained in:
Jeff Bryner 2018-11-21 09:06:44 -08:00
Родитель b51312c5d5
Коммит 6c32cee8f4
1 изменённых файлов: 5 добавлений и 18 удалений

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)