-
Notifications
You must be signed in to change notification settings - Fork 179
HTTPSession documentation #176
Comments
Following up on this because the recently committed 4.6.4 seems to have switched things back in terms of what the functionality I was using. I had replaced HTTPSession.setGlobalCredentialsProvider(CredentialsProvider) with HTTPSession.setGlobalCredentialsProvider(CredentialsProvider, HTTPAuthSchemes.ANY) Calling HTTPSession.setGlobalCredentialsProvider(CredentialsProvider) now seems to work again, so I will use that. Looks like this was the result of Dennis's commit on Jan 11 in response to issue 365. |
Correct. The issue was that we needed to upgrade to properly use Apache HttpClient library version 4.5. The apache people made (IMO) a serious mistake in making significants mods to the API right in the middle of the 4 versions rather than moving to, say, version 5. The result was that we were using Apache version 4.5 and getting a large number of deprecations. Moving to properly use Apache 4.5 required a lot of changes, expecially in adapting to their immutable model and in handling authorization. Some things became simpler, some more complicated. In any case, sorry about any inconvenience. I hope that the current apache API remains stable, but no guarantees with these guys. |
A commit back in early July removed the method
ucar.httpservices.HTTPSession.setGlobalCredentialsProvider(CredentialsProvider)
Unfortunately, the HTTPSession documentation in the reference pages at netcdf-java/reference/Session.html still refers to using this method, so need to be updated.
I bring this up because I have been using this method, so need to figure out a replacement in order to use the new NJ 4.6.3 release. As a first step, I have tried replacing the call by using
HTTPSession.setGlobalCredentialsProvider (AuthScope.ANY, myCredentialsProvider)
but that throws an exception
java.lang.IllegalArgumentException: null argument
at ucar.httpservices.HTTPSession.setGlobalCredentialsProvider(HTTPSession.java:443)
because the AuthScope.ANY.getScheme() method returns null.
The text was updated successfully, but these errors were encountered: