Breaking changes:
* We expanded customisability for different versions of website found. Each env var that specifies the DOM element looked for, requires a `[TYPE][IDENTIFIER]` format, eg.: `CSS_SELECTOR.btn.btn-lg.btn-primary` for the primary submit button. I concluded that such system is necessary when I realised that the 2FA forms have a very different layout for different users. Now it can be customised even more. If you used custom env vars for DOM elements: due to the change in the env var DOM elements processing, you'll need to specify the [TYPE][IDENTIFIER]. This will most likely mean you'll need to add [TYPE] to your existing env vars that specify custom DOM elements if you had any.
Major changes:
Login Strategies:
* IBeam now supports various login logic flows - we call them strategies. These can be selected by setting `IBEAM_AUTHENTICATION_STRATEGY` env var as `A` or `B`. It is possible that this is a temporary feature that will be removed once a clear winning strategy is found.
* Currently used login logic is called strategy 'A'
* New strategy 'B' was added, and is now used by default, based on migoohao's suggestions in 146. The new logic is described in detail in 147. This is done in an attempt to simplify the login logic and rely on `reauthenticate` more than on full re-login. Many thanks for suggesting this logic flow migoohao 👏 I also want to give kudos to any other users who mentioned using `reauthenticate` in the past. See: https://github.com/Voyz/ibeam/issues/147
Authentication rework:
* reworking the authenticate.py. Now it is broken down to step-by-step functions, and hopefully has a much better readability and maintainability. It's functionality has been moved to [login_handler.py](https://github.com/Voyz/ibeam/blob/v0.5.0/ibeam/src/handlers/login_handler.py)
* removing reading environment variables throughout the app. Now all env vars are read in `ibeam_starter.py` and then everything is passed as arguments
* decoupling things from GatewayClient even more. Now we have a bunch of handlers that are responsible for different things
Minor changes:
* updated information about ignoring gateway log display
* added support for UI scaling
* passing current chrome WebDriver to TwoFaHandler.get_two_fa_code()
* 2fa submitting action is now handled by pressing RETURN key instead of looking for the submit element, as the button is not always visible
* added call to validate on each maintenance
* added GCP Secrets Manager as one of the secrets source
* added handling of 503 service unavailable
* fixed boolean env var parsing
* fixed process starting and killing, ensuring we kill all processes
* added more verbosity to 'Gateway running and authenticated' by attaching * session_id and server_name added support for GET and POST requests according to IBKR docs
* logging to sys.stdout instead of default sys.stder, sending logs below WARNING to stdout and equal and above to stderr
Setup changes:
* changed env var defaults: IBEAM_REQUEST_RETRIES from 1 to 2 IBEAM_MAX_REAUTHENTICATE_RETRIES from 5 to 3
* post-authentication treating `not status.running or not status.session` as a reason to kill and restart too
Documentation:
* updated README with GPC Secret Manager
* Mention IBC for TWS/Gateway
Dependencies:
* updated the Gateway to 24 Apr 2023
* updated selenium to 4.12.*
* added pillow to requirements.txt to support cropping and manipulating webpage screenshots