Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ addons:
-

install:
- pip install pytest
- pip install codecov

- pip install tox
- pip install tox-travis
script:
- codecov --version
- tox

after_success:
- codecov
10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pyyaml
jinja2
cryptography
requests
pycryptodomex
git+https://github.com/openid/JWTConnect-Python-CryptoJWT.git
git+https://github.com/openid/JWTConnect-Python-OidcMsg.git
git+https://github.com/openid/JWTConnect-Python-OidcService.git


4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def run_tests(self):
"oidcmsg>=0.6.3",
"oidcservice>=0.6.3",
"cryptojwt>=0.7.0",
"jinja2"
"jinja2",
"pyyaml",
"pycryptodomex"
],
tests_require=[
"pytest", "requests_mock", 'pytest-localserver'
Expand Down
10 changes: 5 additions & 5 deletions src/oidcendpoint/endpoint_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ def __init__(
# client registration access tokens
self.registration_access_token = {}

def set_session_db(self, conf, sso_db=None):
sso_db = sso_db if sso_db else SSODb()
self.do_session_db(conf, sso_db)
def set_session_db(self, conf, sso_db=None, db=None):
sso_db = sso_db or SSODb()
self.do_session_db(conf, sso_db, db)
# append useinfo db to the session db
self.do_userinfo()
logger.debug('Session DB: {}'.format(self.sdb.__dict__))
Expand Down Expand Up @@ -288,10 +288,10 @@ def do_sub_func(self):
else:
self._sub_func[key] = args["function"]

def do_session_db(self, conf, sso_db):
def do_session_db(self, conf, sso_db, db=None):
th_args = get_token_handlers(conf)
self.sdb = create_session_db(
self, th_args, db=None,
self, th_args, db=db,
sso_db=sso_db,
sub_func=self._sub_func
)
Expand Down
19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tox]
envlist =
py36
py37
pypy3

[testenv]
deps =
-r requirements.txt
-r requirements-dev.txt
whitelist_externals =
tox
commands =
python --version
pytest --version
tox --version
pip --version
pip freeze
pytest -vvv -rs {posargs:tests/}