Skip to content
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
11 changes: 1 addition & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: bionic
language: python

sudo: false
Expand All @@ -6,30 +7,20 @@ matrix:
include:
- python: 2.7
env: TOX_ENV=py27-django18
- python: 3.4
env: TOX_ENV=py34-django18
- python: 2.7
env: TOX_ENV=py27-django19
- python: 3.4
env: TOX_ENV=py34-django19
- python: 3.5
env: TOX_ENV=py35-django19
- python: 2.7
env: TOX_ENV=py27-django110
- python: 3.4
env: TOX_ENV=py34-django110
- python: 3.5
env: TOX_ENV=py35-django110
- python: 2.7
env: TOX_ENV=py27-django111
- python: 3.4
env: TOX_ENV=py34-django111
- python: 3.5
env: TOX_ENV=py35-django111
- python: 3.6
env: TOX_ENV=py36-django111
- python: 3.4
env: TOX_ENV=py34-django20
- python: 3.5
env: TOX_ENV=py35-django20
- python: 3.6
Expand Down
7 changes: 4 additions & 3 deletions djangosaml2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def login(request,

kwargs = {}
# pysaml needs a string otherwise: "cannot serialize True (type bool)"
if getattr(conf, '_sp_force_authn'):
if getattr(conf, '_sp_force_authn', False):
kwargs['force_authn'] = "true"
if getattr(conf, '_sp_allow_create', "false"):
if getattr(conf, '_sp_allow_create', False):
kwargs['allow_create'] = "true"

# is a embedded wayf needed?
Expand All @@ -165,7 +165,8 @@ def login(request,
if not idps:
raise IdPConfigurationMissing(('IdP configuration is missing or '
'its metadata is expired.'))
selected_idp = list(idps.keys())[0]
if selected_idp is None:
selected_idp = list(idps.keys())[0]

# choose a binding to try first
sign_requests = getattr(conf, '_sp_authn_requests_signed', False)
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tox]
envlist =
py{27,34,35}-django18
py{27,34,35}-django19
py{27,34,35}-django110
py{27,34,35,36}-django111
py{34,35,36,37}-django20
py{27,35}-django18
py{27,35}-django19
py{27,35}-django110
py{27,35,36}-django111
py{35,36,37}-django20
py{35,36,37}-django21
py{35,36,37}-django22
py{36,37}-django30
Expand Down