Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
d2caa535
Commit
d2caa535
authored
9 years ago
by
Muthu Subramanian
Browse files
Options
Downloads
Patches
Plain Diff
code beautify
parent
f53bae0c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/rest/client/v1/login.py
+4
-9
4 additions, 9 deletions
synapse/rest/client/v1/login.py
with
4 additions
and
9 deletions
synapse/rest/client/v1/login.py
+
4
−
9
View file @
d2caa535
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment