Hi, I am using the following code to do authentication but it always gives me "net.oauth.OAuthProblemException: signature_invalid" exception... File file = new File("c:\\pub.1199819524.-1556113204990931254.cer"); FileInputStream streamer = new FileInputStream(file); byte[] byteArray = new byte[streamer.available()]; for (int j = 0; j < byteArray.length; j++) { byteArray[j] = (byte) streamer.read(); } try { ByteArrayInputStream in = new ByteArrayInputStream(byteArray); CertificateFactory certFac = CertificateFactory.getInstance("X. 509"); X509Certificate cert = (X509Certificate) certFac .generateCertificate(in); try { OAuthServiceProvider provider = new OAuthServiceProvider(null, null, null); OAuthConsumer consumer = new OAuthConsumer(null, request .getParameter("oauth_consumer_key"), null, provider); consumer.setProperty(RSA_SHA1.X509_CERTIFICATE, cert); OAuthMessage message = OAuthServlet.getMessage(request, request.getRequestURL().toString()); System.out.println("request.getRequestURL().toString()" + request.getRequestURL().toString()); OAuthAccessor accessor = new OAuthAccessor(consumer); message.validateSignature(accessor); out.println("Successss");
} catch (Exception e) { e.printStackTrace(); out.println("Failure"); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); out.println("Failure"); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---