|
| 1 | +PORT = 8090 |
| 2 | +BASEURL = "https://localhost:{}".format(PORT) |
| 3 | + |
| 4 | +# If BASE is https these has to be specified |
| 5 | +SERVER_CERT = "certs/cert.pem" |
| 6 | +SERVER_KEY = "certs/key.pem" |
| 7 | +CA_BUNDLE = None |
| 8 | + |
| 9 | +# This is just for testing an local usage. In all other cases it MUST be True |
| 10 | +VERIFY_SSL = False |
| 11 | + |
| 12 | +KEYDEFS = [{"type": "RSA", "key": '', "use": ["sig"]}, |
| 13 | + {"type": "EC", "crv": "P-256", "use": ["sig"]}] |
| 14 | + |
| 15 | +HTML_HOME = 'html' |
| 16 | + |
| 17 | +SECRET_KEY = 'secret_key' |
| 18 | +SESSION_COOKIE_NAME = 'rp_session' |
| 19 | + |
| 20 | +PREFERRED_URL_SCHEME = 'https' |
| 21 | + |
| 22 | +OIDC_KEYS = { |
| 23 | + 'private_path': "./priv/jwks.json", |
| 24 | + 'key_defs': KEYDEFS, |
| 25 | + 'public_path': './static/jwks.json' |
| 26 | +} |
| 27 | + |
| 28 | +PUBLIC_JWKS_PATH = '{}/{}'.format(BASEURL, OIDC_KEYS['public_path']) |
| 29 | + |
| 30 | +# # information used when registering the client, this may be the same for all OPs |
| 31 | +# |
| 32 | +DEFAULT_CLIENT_PREFS = { |
| 33 | + "application_type": "web", "application_name": "rphandler", |
| 34 | + "contacts": ["ops@example.com"], |
| 35 | + "response_types": ["code"], |
| 36 | + "scope": ["openid", "profile", "email", "address", "phone"], |
| 37 | + "token_endpoint_auth_method": ["client_secret_basic", |
| 38 | + 'client_secret_post'] |
| 39 | +} |
| 40 | + |
| 41 | +# Default set if nothing else is specified |
| 42 | +DEFAULT_SERVICES = { |
| 43 | + 'ProviderInfoDiscovery': {}, 'Registration': {}, |
| 44 | + 'Authorization': {}, 'AccessToken': {}, |
| 45 | + 'RefreshAccessToken': {}, 'UserInfo': {}, |
| 46 | + 'EndSession': {} |
| 47 | +} |
| 48 | + |
| 49 | +CLIENT_CONFIG = { |
| 50 | + 'client_preferences': DEFAULT_CLIENT_PREFS, |
| 51 | + 'services': DEFAULT_SERVICES |
| 52 | +} |
| 53 | + |
| 54 | +# The keys in this dictionary are the OPs short user friendly name |
| 55 | +# not the issuer (iss) name. |
| 56 | +# The special key '' is ued for OPs that support dynamic interactions. |
| 57 | + |
| 58 | +CLIENTS = { |
| 59 | + # The ones that support web finger, OP discovery and client registration |
| 60 | + # This is the default, any client that is not listed here is expected to |
| 61 | + # support dynamic discovery and registration. |
| 62 | + "": CLIENT_CONFIG, |
| 63 | + "filip": { |
| 64 | + 'issuer':"https://guarded-cliffs-8635.herokuapp.com/", |
| 65 | + "redirect_uris": ["{}/authz_cb/filip".format(BASEURL)], |
| 66 | + "post_logout_redirect_uris": ["{}/session_logout".format(BASEURL)], |
| 67 | + "client_preferences": DEFAULT_CLIENT_PREFS, |
| 68 | + "services": DEFAULT_SERVICES, |
| 69 | + # "backchannel_logout_session_required": True, |
| 70 | + "backchannel_logout_uri": "{}/bc_logout".format(BASEURL) |
| 71 | + }, |
| 72 | + "flop": { |
| 73 | + 'issuer':"https://127.0.0.1:5000/", |
| 74 | + "redirect_uris": ["{}/authz_cb/flop".format(BASEURL)], |
| 75 | + "post_logout_redirect_uris": ["{}/session_logout".format(BASEURL)], |
| 76 | + "client_preferences": DEFAULT_CLIENT_PREFS, |
| 77 | + "services": DEFAULT_SERVICES, |
| 78 | + # "backchannel_logout_session_required": True, |
| 79 | + "backchannel_logout_uri": "{}/bc_logout/flop".format(BASEURL) |
| 80 | + }, |
| 81 | + "filip_local": { |
| 82 | + 'issuer': "http://localhost:3000/", |
| 83 | + "redirect_uris": ["{}/authz_cb/filip_local".format(BASEURL)], |
| 84 | + "post_logout_redirect_uris": ["{}/session_logout".format(BASEURL)], |
| 85 | + "client_preferences": DEFAULT_CLIENT_PREFS, |
| 86 | + "services": DEFAULT_SERVICES, |
| 87 | + # "backchannel_logout_session_required": True, |
| 88 | + "backchannel_logout_uri": "{}/bc_logout".format(BASEURL) |
| 89 | + } |
| 90 | +} |
| 91 | + |
| 92 | +# Whether an attempt to fetch the userinfo should be made |
| 93 | +USERINFO = True |
0 commit comments