Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
django-cas-server
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Samir
django-cas-server
Commits
cd799354
Commit
cd799354
authored
Jun 04, 2015
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
so no xml/text header in SLO
parent
f1fbdd36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
cas_server/models.py
cas_server/models.py
+1
-3
No files found.
cas_server/models.py
View file @
cd799354
...
...
@@ -331,7 +331,7 @@ class Ticket(models.Model):
def
logout
(
self
,
request
,
session
):
"""Send a SLO request to the ticket service"""
if
self
.
validate
and
self
.
single_log_out
:
xml
=
"""<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xml
=
u
"""<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="
%(id)
s" Version="2.0" IssueInstant="
%(datetime)
s">
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"></saml:NameID>
<samlp:SessionIndex>
%(ticket)
s</samlp:SessionIndex>
...
...
@@ -341,12 +341,10 @@ class Ticket(models.Model):
'datetime'
:
timezone
.
now
()
.
isoformat
(),
'ticket'
:
self
.
value
}
headers
=
{
'Content-Type'
:
'text/xml'
}
try
:
return
session
.
post
(
self
.
service
.
encode
(
'utf-8'
),
data
=
{
'logoutRequest'
:
xml
.
encode
(
'utf-8'
)},
headers
=
headers
)
except
Exception
as
error
:
if
request
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment