Re: [netcdf-java] netcdf-java authentication

Never mind, looks like we ca do this via the ucar.httpservices.HTTPSession
object. We just need to add the scope and credentials.

On Mon, Aug 1, 2016 at 4:17 PM, Rahul Palamuttam <rahulpalamut@xxxxxxxxx>
wrote:

> Hi Walker,
>
> Thanks you for your reply.
>
> How do you get that HttpClient object in NetCDF-java?
> I'm using the ucar.cdm 4.6.0 package and the NetcdfDataset object no
> longer has the setHttpClient/getHttpClient methods.
>
> In fact I can't find the setHttpClient method in HTTPRandomAccessFile or
> DConnect2
>
> - Rahul P
>
> On Mon, Aug 1, 2016 at 4:06 PM, Walker, Jordan <jiwalker@xxxxxxxx> wrote:
>
>> Rahul,
>>
>> I worked on some code a while back that attempted to do something close
>> to this.  While it wasn't directly built into the NetCDF-Java, it logs into
>> the URS system and proxies NetCDF-Java HTTP calls through a proxy that
>> attaches the credentials to requests passing through.  You can take a look
>> at the code (
>> https://github.com/USGS-CIDA/geo-data-portal/blob/master/gdp-common-utilities/src/main/java/gov/usgs/cida/gdp/urs/URSLoginProvider.java),
>> but you should be able to set the Credentials Provider of the HTTP client
>> used by NetCDF-Java.
>>
>> I hope that helps.
>> --
>> Jordan Walker
>> Office of Water Information
>> US Geological Survey
>> 8505 Research Way
>> Middleton, WI 53562
>> 608.821.3842
>>
>> On Mon, Aug 1, 2016 at 4:53 PM, Rahul Palamuttam <rahulpalamut@xxxxxxxxx>
>> wrote:
>>
>>> Hi Everyone,
>>>
>>> I'm writing a java framework that reads netcdf files from various
>>> sources,
>>> like gesdisc. However, gesdisc now requires you to be logged in to the
>>> earth data system. While I have done the necessary steps, I am still
>>> not able to use NetcdfDataset.openDataset(url) to fetch my file.
>>>
>>> I even followed the pydap way of doing it :
>>> http://username:password@server/...yadayadayada
>>>
>>> Much help appreciated. GESDISC made the change to require earthdata
>>> log-in today and my java api broke because of it.
>>>
>>> Thanks,
>>>
>>> Rahul Palamuttm
>>>
>>> _______________________________________________
>>> NOTE: All exchanges posted to Unidata maintained email lists are
>>> recorded in the Unidata inquiry tracking system and made publicly
>>> available through the web.  Users who post to any of the lists we
>>> maintain are reminded to remove any personal information that they
>>> do not want to be made public.
>>>
>>>
>>> netcdf-java mailing list
>>> netcdf-java@xxxxxxxxxxxxxxxx
>>> For list information or to unsubscribe, visit:
>>> http://www.unidata.ucar.edu/mailing_lists/
>>>
>>
>>
>
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: