-
Notifications
You must be signed in to change notification settings - Fork 145
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
Proxy support in MSAL for ObjectiveC on Mac #927
Comments
Can you describe a little bit more what do you mean by a "proxy" and what is the scenario? |
Apologies for less information about the question. Suppose on one machine I have configured a proxy server (e.g. using CCProxy or any other proxy server software) and on other machines I have updated network configuration to use this proxy server so that all the web requests from my other machines should go through the proxy server. Now if I launch the authentication app created using MSAL & ObjectiveC then it should also honor the proxy settings. For that, I assume, I will have to pass the proxy server settings (server address, credentials etc.) to PublicClientApplication. This is what I could do in authentication application created in .NET Classic & MSAL. I have to pass HttpClientFactory which creates HttpClient and provide proxy server details. I referred to https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/httpclient I was looking for similar support in MSAL for ObjectiveC. It would be great if there is similar link which could guide me to achieve proxy support in my ObjectiveC application. Thanks! |
Can anyone please help me here. Thanks! |
@vikashsonar. I think iOS provides a built in way to configure proxy for the entire device in iOS settings. Would that work for your scenario? Regarding supporting it with MSAL, we don't currently support custom NSURLSession configuration for MSAL requests. We always create default session configuration internally and it seems that this would be something that needs to be configured there: https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411499-connectionproxydictionary?language=objc. However, we already support a few configuration options for NSURLSession in MSAL in MSALHTTPConfig: https://azuread.github.io/microsoft-authentication-library-for-objc/Classes/MSALHTTPConfig.html So I believe we can pass additional configuration there (e.g. letting developer provide session configuration object to use for token requests). I'd welcome a pull request to add this functionality to MSAL library :) If you'd like to contribute this feature, just open a PR with changes against MSAL and common library dev branch. |
@oldalton Thanks for the clarification. I will try some scenarios and will update here. |
Hi @oldalton I tested my application having proxy settings in place. Looks like the expected scenarios are working successfully without a need to set proxy in application explicitly. |
Ahh.. I didn't realize you have moved it to feature. Yes, I think it will be great to have the flexibility to provide proxy configuration. Reopening... |
MSAL for .NET has proxy support using HttpClientFactory. In HttpClientFactory implementation I can create HttpClient and provide proxy details, then that HttpClientFactory can be used while creating PublicClientApplication.
However I couldn't find classes in MSAL for ObjectiveC to support proxy. Please guide me with an example. I want to do interactive and silent authentication using MSALPublicClientApplication.
The text was updated successfully, but these errors were encountered: