Skip to content

unauthenticated proxy for iot device sdk #1443

Answered by timtay-microsoft
xtx2017 asked this question in Q&A
Discussion options

You must be logged in to vote

The constructor

public ProxySettings(Proxy proxy){
    this(proxy, null, null);
}

allows you to create your client with an unauthenticated proxy. The IllegalArgumentException that you have highlighted here

    if (username != null && username.isEmpty(); {
        throw new IllegalArgumentException("Username cannot be an empty string");
    }

assumes that if the username is null, then no authentication will be used when connecting to the proxy. It just doesn't allow for the username to be an empty string since we thought that was an ambiguous use case.

I wonder that the proxy setting for IoT service SDK is only for unauthenticated proxy different from device SDK.
(com.microsoft.azure.sdk.…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by timtay-microsoft
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants