summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorMuthu Subramanian <muthu.subramanian.karunanidhi@ericsson.com>2015-07-09 12:58:15 +0530
committerMuthu Subramanian <muthu.subramanian.karunanidhi@ericsson.com>2015-07-09 12:58:15 +0530
commitd2caa5351aece72b274f78fe81348f715389d421 (patch)
tree45a7b56a2702a3150c800dbecc34e38c54ee4cfc /synapse/rest
parentcode beautify (diff)
downloadsynapse-d2caa5351aece72b274f78fe81348f715389d421.tar.xz
code beautify
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v1/login.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py
index b4c74c4c20..b4894497be 100644
--- a/synapse/rest/client/v1/login.py
+++ b/synapse/rest/client/v1/login.py
@@ -20,19 +20,15 @@ from synapse.types import UserID
 from base import ClientV1RestServlet, client_path_pattern
 
 import simplejson as json
-import cgi
 import urllib
 
 import logging
-from saml2 import BINDING_HTTP_REDIRECT
 from saml2 import BINDING_HTTP_POST
-from saml2.metadata import create_metadata_string
 from saml2 import config
 from saml2.client import Saml2Client
-from saml2.httputil import ServiceError
-from saml2.samlp import Extensions
-from saml2.extension.pefim import SPCertEnc
-from saml2.s_utils import rndstr
+
+
+logger = logging.getLogger(__name__)
 
 
 class LoginRestServlet(ClientV1RestServlet):
@@ -137,9 +133,8 @@ class SAML2RestServlet(ClientV1RestServlet):
             conf.load_file(self.sp_config)
             SP = Saml2Client(conf)
             saml2_auth = SP.parse_authn_request_response(
-                            request.args['SAMLResponse'][0], BINDING_HTTP_POST)
+                request.args['SAMLResponse'][0], BINDING_HTTP_POST)
         except Exception, e:        # Not authenticated
-            logger = logging.getLogger(__name__)
             logger.exception(e)
         if saml2_auth and saml2_auth.status_ok() and not saml2_auth.not_signed:
             username = saml2_auth.name_id.text