Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
django-cas-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Samir
django-cas-server
Commits
e820a3a5
Commit
e820a3a5
authored
Jun 23, 2016
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes to cas.py, waiting for upstream merge
parent
7a637c73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
cas_server/cas.py
cas_server/cas.py
+4
-1
No files found.
cas_server/cas.py
View file @
e820a3a5
...
...
@@ -134,7 +134,7 @@ class CASClientV1(CASClientBase):
Returns username on success and None on failure.
"""
params
=
[(
'ticket'
,
ticket
),
(
'service'
,
self
.
service
)]
params
=
[(
'ticket'
,
ticket
),
(
'service'
,
self
.
service
_url
)]
url
=
(
urllib_parse
.
urljoin
(
self
.
server_url
,
'validate'
)
+
'?'
+
urllib_parse
.
urlencode
(
params
))
page
=
urllib_request
.
urlopen
(
url
)
...
...
@@ -294,6 +294,9 @@ class CASClientWithSAMLV1(CASClientV2, SingleLogoutMixin):
success
=
tree
.
find
(
'.//'
+
SAML_1_0_PROTOCOL_NS
+
'StatusCode'
)
if
success
is
not
None
and
success
.
attrib
[
'Value'
].
endswith
(
':Success'
):
# User is validated
name_identifier
=
tree
.
find
(
'.//'
+
SAML_1_0_ASSERTION_NS
+
'NameIdentifier'
)
if
name_identifier
is
not
None
:
user
=
name_identifier
.
text
attrs
=
tree
.
findall
(
'.//'
+
SAML_1_0_ASSERTION_NS
+
'Attribute'
)
for
at
in
attrs
:
if
self
.
username_attribute
in
list
(
at
.
attrib
.
values
()):
...
...
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