Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: spid-sp-test exit code in CI #55

Merged
merged 3 commits into from
Jun 14, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
./manage.py migrate > /dev/null 2>&1
./manage.py runserver > /dev/null 2>&1 &
sleep 5
spid_sp_test --metadata-url http://localhost:8000/spid/metadata/ --authn-url http://localhost:8000/spid/login/?idp=http://localhost:8080 --extra --exit-zero --debug ERROR -tr
spid_sp_test --metadata-url http://localhost:8000/spid/metadata/ --authn-url http://localhost:8000/spid/login/?idp=http://localhost:8080 --extra --debug ERROR -tr
- name: Test Django reusable app
working-directory: .
run: |
Expand Down
6 changes: 4 additions & 2 deletions src/djangosaml2_spid/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,13 @@ def custom_validation(self, response):
accepted_time_diff = conf.accepted_time_diff
recipient = conf._sp_endpoints['assertion_consumer_service'][0][0]
authn_context_classref = settings.SPID_AUTH_CONTEXT

in_response_to = ''
oq_cache = OutstandingQueriesCache(self.request.saml_session)
logger.debug("Cache queries: {}".format(oq_cache.outstanding_queries()))
for key, _value in oq_cache.outstanding_queries().items():
in_response_to = key # FIXME?: filtering by _value??
in_response_to = key
logger.debug("in_response_to={!r}".format(in_response_to))
break

validator = Saml2ResponseValidator(authn_response=response.xmlstr,
Expand Down