Commit 4b06947a authored by Florian Duguet's avatar Florian Duguet Committed by Romain Bignon

[edf - par] fix login - add otp_data to __states__

and remove useless otp_url

Closes: 40068@sibi
parent 5adea5fd
......@@ -56,12 +56,11 @@ class EdfBrowser(LoginBrowser, StatesMixin):
r'&di=(?P<di>.*)&bn=(?P<bn>.*)&an=(?P<an>.*)', BillDownload)
profile = URL('/services/rest/context/getCustomerContext', ProfilePage)
__states__ = ['id_token1']
__states__ = ['id_token1', 'otp_data']
def __init__(self, config, *args, **kwargs):
self.config = config
self.otp_data = None
self.otp_url = None
self.id_token1 = None
kwargs['username'] = self.config['login'].get()
kwargs['password'] = self.config['password'].get()
......@@ -90,7 +89,6 @@ class EdfBrowser(LoginBrowser, StatesMixin):
self.logger.info('already logged')
return
self.otp_url = self.url
self.authenticate.go(method='POST', params=auth_params)
data = self.page.get_data()
data['callbacks'][0]['input'][0]['value'] = self.username
......
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