|
51 | 51 | DATA_BLOB_MAGIC = b'python-fints_DATABLOB'
|
52 | 52 | DATA_BLOB_MAGIC_RETRY = b'python-fints_RETRY_DATABLOB'
|
53 | 53 |
|
| 54 | +# workaround for ING not offering PSD2 conform two step authentication |
| 55 | +# ING only accepts one step authentication and only allows reading operations |
| 56 | +ING_BANK_IDENTIFIER = BankIdentifier(country_identifier='280', bank_code='50010517') |
| 57 | + |
54 | 58 |
|
55 | 59 | class FinTSOperations(Enum):
|
56 | 60 | """This enum is used as keys in the 'supported_operations' member of the get_information() response.
|
@@ -1257,6 +1261,8 @@ def _deconstruct_v1(self, including_private=False):
|
1257 | 1261 | return data
|
1258 | 1262 |
|
1259 | 1263 | def is_tan_media_required(self):
|
| 1264 | + if self.bank_identifier == ING_BANK_IDENTIFIER: |
| 1265 | + return False |
1260 | 1266 | tan_mechanism = self.get_tan_mechanisms()[self.get_current_tan_mechanism()]
|
1261 | 1267 | return getattr(tan_mechanism, 'supported_media_number', None) is not None and \
|
1262 | 1268 | tan_mechanism.supported_media_number > 1 and \
|
@@ -1379,7 +1385,7 @@ def send_tan(self, challenge: NeedTANResponse, tan: str):
|
1379 | 1385 | return resume_func(challenge.command_seg, response)
|
1380 | 1386 |
|
1381 | 1387 | def _process_response(self, dialog, segment, response):
|
1382 |
| - if response.code == '3920': |
| 1388 | + if response.code == '3920' and not self.bank_identifier == ING_BANK_IDENTIFIER: |
1383 | 1389 | self.allowed_security_functions = list(response.parameters)
|
1384 | 1390 | if self.selected_security_function is None or not self.selected_security_function in self.allowed_security_functions:
|
1385 | 1391 | # Select the first available twostep security_function that we support
|
|
0 commit comments