Closed wvteijlingen closed 6 years ago
Yes that is true. Is there a reason why you want to split this other than it is not required? Because I rather have a single check that ensures the config has all it needs than needing to implement the check on multiple locations. To do anything useful with the api we need the api key at some point.
I have a server that acts as a 'proxy' to the Bunq API. So multiple clients, each with an unique API key, use my webserver to connect to Bunq.
When setting up the server, I need to run the installation once to send the public key to Bunq. And since the clients supply the API key to my server per request, I don't have a fixed API key for the installation.
Ok, i see. Created https://github.com/jorttbv/bunq-client/pull/11.
The API documentation from Bunq doesn't mention anything about the API key being required when creating an installation. However, the Configuration class raises an error when config.api_key is nil. This means it is impossible to create an installation without having an API key.
I've looked through the codebase and I think we can solve this as follows:
SessionServer
here.DeviceServer
here.