From 4d5d75d77603e4fb9e77d9e092edfb1be93adf54 Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Tue, 16 Dec 2014 13:15:57 +0100 Subject: [PATCH] Split config.py.example into two files onevery simple and one slightly more complex. --- .../op2/{config.py.example => config.py.full} | 0 oidc_example/op2/config.py.simple | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+) rename oidc_example/op2/{config.py.example => config.py.full} (100%) create mode 100644 oidc_example/op2/config.py.simple diff --git a/oidc_example/op2/config.py.example b/oidc_example/op2/config.py.full similarity index 100% rename from oidc_example/op2/config.py.example rename to oidc_example/op2/config.py.full diff --git a/oidc_example/op2/config.py.simple b/oidc_example/op2/config.py.simple new file mode 100644 index 0000000..f464bcb --- /dev/null +++ b/oidc_example/op2/config.py.simple @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- + +# issuer= "https://www.kodtest.se/rolandsOP" +baseurl = "https://localhost" +#baseurl = "https://lingon.ladok.umu.se" +issuer = "%s:%%d" % baseurl + +keys = [ + {"type": "RSA", "key": "cp_keys/key.pem", "use": ["enc", "sig"]}, + {"type": "EC", "crv": "P-256", "use": ["sig"]}, + {"type": "EC", "crv": "P-256", "use": ["enc"]} +] + +SERVICE_URL = "%s/verify" % issuer + +#Only Username and password. +AUTHENTICATION = { + "UserPassword": {"ACR": "PASSWORD", "WEIGHT": 1, "URL": SERVICE_URL, + "END_POINTS": ["verify"]} +} + +COOKIENAME = 'pyoic' +COOKIETTL = 4 * 60 # 4 hours +SYM_KEY = "SoLittleTime,Got" + +SERVER_CERT = "certs/server.crt" +SERVER_KEY = "certs/server.key" +#CERT_CHAIN="certs/chain.pem" +CERT_CHAIN = None + +# ======= SIMPLE DATABASE ============== + +USERINFO = "SIMPLE" + +USERDB = { + "diana": { + "sub": "dikr0001", + "name": "Diana Krall", + "given_name": "Diana", + "family_name": "Krall", + "nickname": "Dina", + "email": "diana@example.org", + "email_verified": False, + "phone_number": "+46 90 7865000", + "address": { + "street_address": "Umeå Universitet", + "locality": "Umeå", + "postal_code": "SE-90187", + "country": "Sweden" + }, + }, + "babs": { + "sub": "babs0001", + "name": "Barbara J Jensen", + "given_name": "Barbara", + "family_name": "Jensen", + "nickname": "babs", + "email": "babs@example.com", + "email_verified": True, + "address": { + "street_address": "100 Universal City Plaza", + "locality": "Hollywood", + "region": "CA", + "postal_code": "91608", + "country": "USA", + }, + }, + "upper": { + "sub": "uppe0001", + "name": "Upper Crust", + "given_name": "Upper", + "family_name": "Crust", + "email": "uc@example.com", + "email_verified": True, + } +} +