Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: made setAuthentication public to allow credential changing #270

Merged
merged 1 commit into from
Jun 11, 2023

Conversation

byt3sage
Copy link
Contributor

Hey!
So - we want to instantiate the Mailjet Client as a singleton with our master API credentials however for some of our 'customers' we want to be able to send requests dynamically to their sub-accounts without us having to re-instantiate a mailjet client constantly (we're going to be processing data at high volume so this will create a fair bit of overhead).

To allow us to switch credentials on the fly, we'd like the setAuthentication method to be public so we can just update our one instance for our sub-accounts instead of creating new clients constantly.

Happy to hear your thoughts around this!

@oleksandr-mykhailenko
Copy link
Collaborator

Hello @jaetoole
this one looks good for me

@oleksandr-mykhailenko oleksandr-mykhailenko merged commit 6125a15 into mailjet:master Jun 11, 2023
@byt3sage byt3sage deleted the chore/auth-switcher branch June 13, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants