Commit 12cc26ef authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Vincent A

[caissedepargne] bypass TLS_CLIENT_CERTIFICATE

When this authentification method is the default choice, we check if we
can use PASSWORD authentification mode.
parent 36a9bd4d
......@@ -605,6 +605,25 @@ class CaisseEpargneLogin(LoginBrowser, StatesMixin):
label = "Veuillez renseigner le code affiché sur le boitier (Lecteur CAP en mode « Code »)"
raise BrowserQuestion(Value('emv_otp', label=label))
def handle_certificate_authentification(self, *params):
# We don't handle this authentification mode yet
# But we can check if PASSWORD authentification can be done
doc =
self.url + '/step',
json={"fallback": {}}
if == 'PASSWORD':
# To use vk_authentication method we merge the two last json
# The first one with authentication values and second one with vk values
doc['step'] = = doc
return self.do_vk_authentication(*params)
raise AuthMethodNotImplemented('TLS_CLIENT_CERTIFICATE')
def handle_emv_otp(self):
......@@ -645,7 +664,8 @@ class CaisseEpargneLogin(LoginBrowser, StatesMixin):
This method is used for login or transfer/new recipient authentication.
authentication_method (str): authentication method in ('SMS', 'CLOUDCARD', 'PASSWORD', 'EMV')
authentication_method (str): authentication method in:
feature (str): action that need authentication in ('login', 'transfer', 'recipient')
......@@ -653,6 +673,7 @@ class CaisseEpargneLogin(LoginBrowser, StatesMixin):
'CLOUDCARD': self.do_cloudcard_authentication,
'PASSWORD': self.do_vk_authentication,
'EMV': self.do_otp_emv_authentication,
'TLS_CLIENT_CERTIFICATE': self.handle_certificate_authentification,
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