Closed nickfla1 closed 2 years ago
Thanks for the contribution @nickfla1. What's your use-case for this? Is it so you don't have to create a new instance per token? If so, curious why not just make token
an optional field instead token?: string
and just update the tests accordingly.
Hi @johnagan thanks for your reply.
What's your use-case for this? Is it so you don't have to create a new instance per token?
Most of our API calls, ones directed to Webflow included, go through a Man In The Middle proxy which handles authetication for our clients. So, in our case we don't have the token at all.
If so, curious why not just make token an optional field instead token?: string and just update the tests accordingly.
I didn't want to break current use cases, that might rely on the library's validation in the constructor, but if you say that it won't be a problem, I'd also prefer a cleaner solution.
Hi @johnagan sorry to bother, do you have any feedback on the matter?
@nickfla1 imo this feels like quite an edge use-case, so I'm not open to changing the interface so much to support it. I'd consider a PR that makes token
in the constructor optional, but not so much adding additional arguments.
You may also want to consider just maintaining a fork for your use-case since this SDK doesn't change that often.
Closed in favor of #58
Solves #56
Description
Adds a flag (
handleAuthorization
) that allows to enable/disable authorization handling by the client, rendering thetoken
property optional if set tofalse
.