This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
mandaye-cud/mandaye_cud/auth/arcopole.py

15 lines
423 B
Python

import base64
from mandaye.auth.saml2 import SAML2Auth
class SamlArcopoleAuth(SAML2Auth):
""" Overload replay for arcopole
"""
def replay(self, env, post_values):
""" we need to b64encode the password for arcopole """
pwd = self.form_values['password_field']
post_values[pwd] = base64.b64encode(post_values[pwd])
return super(SamlArcopoleAuth, self).replay(env, post_values)