Closed hugobarona closed 4 years ago
Hi @hugobarona , thank you for the feedback!
It is possible to use the tool together with the secure API. Just modify the appconfig.json:
I'll make sure this option is more visible in the documentation (readme, etc.)
Please let me know if it solves your issue, thanks!
Hi @petrsvihlik,
if you consider following the recommended way to use the tool, so installing it as a .NET Core Global Tool, then you need arguments when running the tool to be able to specify the key.
That's what i mean. Of course in the code, you can do anything. Anyway, if i have some time, i can contribute with this change for you guys, if you don't implement it before. Thanks
@hugobarona absolutely agreed. I'll have a quick peek into this topic today and will let you know. It's a bit more complex as we'd like to replace the command-line parsing library too (#93)
Is this solution acceptable?
https://github.com/Kentico/kontent-generators-net#advanced-configuration-preview-api-secure-api
feel free to reopen the issue if you run into any problems
@petrsvihlik i presume the argument for the key was not introduced in the command args right?
you can configure any of the DeliveryOptions properties this way
e.g. --DeliveryOptions:SecureAccessApiKey xyz
Motivation
By default, my client uses Kentico projects with secure option enabled, and sometimes we need to disable it in order to run this tool, whereas preferably it would be good to do not be required to disable it.
Proposed solution
Allow to send the api-key as parameter when running the tool, so it can run against the Secure Delivery API.