Skip to content

Commit

Permalink
Merge pull request #55 from italia/CI
Browse files Browse the repository at this point in the history
fix: spid-sp-test exit code in CI
  • Loading branch information
brunato authored Jun 14, 2021
2 parents 99aec14 + 505a446 commit 03e4127
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit 03e4127

Please sign in to comment.