Commit a2e12b2a authored by ale's avatar ale

adjust the default processor

parent 68d0b801
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment