Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
sso
Commits
a2e12b2a
Commit
a2e12b2a
authored
Oct 14, 2016
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust the default processor
parent
68d0b801
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/sso_server/sso_server/saml/registry.py
src/sso_server/sso_server/saml/registry.py
+10
-0
No files found.
src/sso_server/sso_server/saml/registry.py
View file @
a2e12b2a
...
...
@@ -3,7 +3,9 @@ from __future__ import absolute_import
"""
Registers and loads Processor classes from settings.
"""
import
base64
import
warnings
import
zlib
from
importlib
import
import_module
...
...
@@ -14,6 +16,7 @@ from .app import saml_app
def
SSOProcessor
(
base
.
Processor
):
"""SAML processor for the Ruby omniauth saml gem."""
def
_validate_request
(
self
):
super
(
SSOProcessor
,
self
).
_validate_request
()
...
...
@@ -21,7 +24,14 @@ def SSOProcessor(base.Processor):
if
'.autistici.org'
not
in
url
:
raise
exceptions
.
CannotHandleAssertion
(
'ACS is not a supported URL'
)
def
_decode_request
(
self
):
self
.
_request_xml
=
zlib
.
decompress
(
base64
.
b64decode
(
self
.
_saml_request
),
-
15
)
def
_format_assertion
(
self
):
# Add attributes that gitlab needs (?).
self
.
_assertion_params
[
'ATTRIBUTES'
]
=
{
'name'
:
self
.
_subject
,
}
self
.
_assertion_xml
=
xml_render
.
get_assertion_salesforce_xml
(
self
.
_assertion_params
,
signed
=
True
)
...
...
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