Skip to content
Snippets Groups Projects
Commit 11881746 authored by ale's avatar ale
Browse files

Allow passing SSO public key as parameter (for testing)

parent 661f78ef
Branches
No related tags found
No related merge requests found
Pipeline #37153 passed
......@@ -22,6 +22,11 @@ def init_sso(app, talisman):
if 'SSO_DOMAIN' not in app.config:
raise Exception('Must configure SSO_DOMAIN')
# Allow passing the public key as a parameter (useful for testing)
# or read it from a file.
if 'SSO_PUBLIC_KEY' in app.config:
pubkey = app.config['SSO_PUBLIC_KEY']
else:
pubkey_file = app.config.get(
'SSO_PUBLIC_KEY_FILE', '/etc/sso/public.key')
with open(pubkey_file, 'rb') as f:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment