Closed frahugo closed 3 years ago
Hey @frahugo I don't have the bandwidth to do much beyond reviewing a PR but if you want to contribute this, that would be great. I'd be fine with breaking backwards compatibility a bit. We can bump the major version number.
Ok cool. I will work on that. I will try to stay backward compatible and simply add functionality.
@neilberkman Can you have a quick review of the commits so far in my branch: https://github.com/frahugo/docusign_elixir/commits/multiple-user-ids
I want to decouple the OAuth adapter as much as possible from the configuration when creating a client. To be backward compatible, if no user_id is provided, it would use a "default" user id from the configuration. Anyhow, let me know if you are OK with such big changes.
@frahugo definitely, looks great so far! 👍
Closed by #30
Currently, the library is designed to authenticate with DocuSign using one
USER_ID
. The JWT token that gets generated is tied to that user ID. Our application needs to create enveloppes under different DocuSign users, for security reasons.The JWT OAuth token is persisted in a GenServer (
DocuSign.APIClient
). When establishing a new connection, we can provide the API client to use. It would then be just a matter of starting up a client for a given user and use it. We could also add a client registry to manage the lifecycle of those GenServers. Of course, we would need to modifyDocuSign.OAuth
to accept auser_id
as a parameter (or option) instead of fetching if from the configuration.Any suggestions/ideas/comments?