Skip to content
This repository has been archived by the owner on Dec 22, 2018. It is now read-only.

Is this a global setting? #2

Closed
marcoancona opened this issue May 8, 2017 · 3 comments
Closed

Is this a global setting? #2

marcoancona opened this issue May 8, 2017 · 3 comments

Comments

@marcoancona
Copy link

I used to instanciate the exchnage service like:

const exchange = new ews.ExchangeService(version);
exchange.Credentials = new ews.ExchangeCredentials(login, pass);
exchange.Url = new ews.Uri(externalServerUrl);

Since the app has to support multiple accounts, calling the code above multiple time with different user and password works fine.

If, however, I use the new ConfigurationApi for NLTM this will change the credentials of all previous instances of ExchangeService, won't it?

ews.ConfigurationApi.ConfigureXHR(new ewsAuth.ntlmAuthXhrApi(login, pass));

How can I use multiple Exchange Services, each with his own credentials (either Basic or NLTM)?

@gautamsi
Copy link
Owner

gautamsi commented May 8, 2017

Authentication adapter is global. Let me make a feature addition for this so that you can use it per instance

@gautamsi
Copy link
Owner

gautamsi commented May 8, 2017

track here

@gautamsi
Copy link
Owner

closed referencing issue.

with 0.9 dev 7 You can now use this per instance of ExchangeServiceBase (ExchangeService and AutodiscoverService).

use ConfigurationApi.ConfigureXHR to configure this globally. when want to override modify using

service.XHRApi = new ewsAuth.ntlmAuthXhrApi(credentials.userName, credentials.password)

where service is ExchangeService or AutodiscoverService

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants