summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-03-19 17:08:51 -0400
committerSimo Sorce <simo@redhat.com>2014-03-19 17:34:01 -0400
commit8f6f3b2226d66a085fffa521dea1cf31c42e896f (patch)
tree12458ea96eedd51de6f456a9074bc181d93eb327
parenta20ce824bb867e50e888d4ffb1357f35dbdfebc3 (diff)
downloadipsilon-8f6f3b2226d66a085fffa521dea1cf31c42e896f.tar.gz
ipsilon-8f6f3b2226d66a085fffa521dea1cf31c42e896f.tar.xz
ipsilon-8f6f3b2226d66a085fffa521dea1cf31c42e896f.zip
Fix minor syntax issues in saml2 provider
Signed-off-by: Simo Sorce <simo@redhat.com>
-rwxr-xr-xipsilon/providers/saml2/auth.py2
-rwxr-xr-xipsilon/providers/saml2/provider.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ipsilon/providers/saml2/auth.py b/ipsilon/providers/saml2/auth.py
index 0dd16b8..ff81af6 100755
--- a/ipsilon/providers/saml2/auth.py
+++ b/ipsilon/providers/saml2/auth.py
@@ -183,7 +183,7 @@ class AuthenticateRequest(ProviderPageBase):
raise AuthenticationError("Unavailable Name ID type",
lasso.SAML2_STATUS_CODE_AUTHN_FAILED)
- # TODO: add user attributes as policy requires taking from 'usersession'
+ # TODO: add user attributes as policy requires from 'usersession'
def saml2error(self, login, code, message):
status = lasso.Samlp2Status()
diff --git a/ipsilon/providers/saml2/provider.py b/ipsilon/providers/saml2/provider.py
index 03efeb3..d3ed5da 100755
--- a/ipsilon/providers/saml2/provider.py
+++ b/ipsilon/providers/saml2/provider.py
@@ -89,7 +89,7 @@ class ServiceProvider(object):
def get_valid_nameid(self, nip):
self._debug('Requested NameId [%s]' % (nip.format,))
- if nip.format == None:
+ if nip.format is None:
return NAMEID_MAP[self.default_nameid]
elif nip.format == lasso.SAML2_NAME_IDENTIFIER_FORMAT_UNSPECIFIED:
return NAMEID_MAP[self.default_nameid]