Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

https authentication through REST API

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am new to REST.

I am trying to access a https url from jersy client.

please help me by providing the steps to access.
[ accessing http url is working fine at the moment.]

 
Saloon Keeper
Posts: 7317
170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTPS is usually used to provide encryption, not authentication. Is it really authentication you want to implement?

Generally, using HTTPS involves nothing more than changing the URL from 'http:" to "https:". Have you tried that? If so, what happened?
 
saidi Bandi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Tom,
when I tried to access https URL, I am seeing below error.

Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

by this error what i am expecting is , I need SSL certificate for the https URL, please correct me if I am wrong.
 
Tim Moores
Saloon Keeper
Posts: 7317
170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed, that's what it means. More information can be found at https://blogs.oracle.com/gc/entry/unable_to_find_valid_certification, and the code that's mentioned there (the InstallCert class) can now be found as part of https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/java-use-examples/source-archive.zip
 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic