summaryrefslogtreecommitdiff
path: root/src/saml2/client_base.py
diff options
context:
space:
mode:
authorEgor Panfilov <edpanfilov@sbcloud.ru>2018-11-19 18:23:17 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2018-11-19 19:07:23 +0200
commit3a514b4cbebcf207f4b9dc29fee1f425572aca79 (patch)
tree8cfb2e421d285c97140ca6b34f330761b1245e19 /src/saml2/client_base.py
parenta8c6320095a73c61353b6c10df60cf3688dfedd3 (diff)
downloadpysaml2-3a514b4cbebcf207f4b9dc29fee1f425572aca79.tar.gz
Various small refactor
Diffstat (limited to 'src/saml2/client_base.py')
-rw-r--r--src/saml2/client_base.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py
index d0a8e82c..b0d14863 100644
--- a/src/saml2/client_base.py
+++ b/src/saml2/client_base.py
@@ -7,6 +7,8 @@ to conclude its tasks.
"""
import threading
import six
+import time
+import logging
from saml2.entity import Entity
@@ -25,7 +27,6 @@ from saml2.extension import sp_type
from saml2.extension import requested_attributes
import saml2
-import time
from saml2.soap import make_soap_enveloped_saml_thingy
from six.moves.urllib.parse import parse_qs
@@ -94,7 +95,7 @@ class Base(Entity):
""" The basic pySAML2 service provider class """
def __init__(self, config=None, identity_cache=None, state_cache=None,
- virtual_organization="", config_file="", msg_cb=None):
+ virtual_organization="", config_file="", msg_cb=None):
"""
:param config: A saml2.config.Config instance
:param identity_cache: Where the class should store identity information
@@ -133,10 +134,12 @@ class Base(Entity):
setattr(self, attr, val)
- if self.entity_type == "sp" and not any([self.want_assertions_signed,
- self.want_response_signed]):
- logger.warning("The SAML service provider accepts unsigned SAML Responses " +
- "and Assertions. This configuration is insecure.")
+ if (self.entity_type == "sp"
+ and not any([self.want_assertions_signed,
+ self.want_response_signed])):
+ logger.warning("The SAML service provider accepts unsigned SAML "
+ "Responses and Assertions. This configuration is "
+ "insecure.")
self.artifact2response = {}