Hi, I tried below mentioned code in Client Side and Server side. I am getting signature_invalid. Please help what I am doing wrong?
Client Side: (Also tried with POST, but the issue is same) ------------------------------------------------------------------------------------------------------------------------------------------------ params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED; params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON; gadgets.io.makeRequest(my_servlet_url, myCallBackFun,params); Server Side: ------------------------------------------------------------------------------------------------------------------------------------------------ try { ByteArrayInputStream in = new ByteArrayInputStream(CERTIFICATE.getBytes()); CertificateFactory certFac = CertificateFactory.getInstance("X509"); X509Certificate cert = (X509Certificate)certFac.generateCertificate(in); OAuthServiceProvider provider = new OAuthServiceProvider(null, null, null); OAuthConsumer consumer = new OAuthConsumer(null, "orkut.com", null, provider); consumer.setProperty(RSA_SHA1.X509_CERTIFICATE, CERTIFICATE); OAuthMessage message = OAuthServlet.getMessage(request, null); OAuthAccessor accessor = new OAuthAccessor(consumer); out.print("*** OAuthMessage Params [Before calling:validateSignature() method] *** "); for(java.util.Map.Entry param: message.getParameters()) { out.print("<br>"); out.print("Param Name-->"+param.getKey()); out.print(" "); out.print("Value-->"+param.getValue()); } out.print("<br>"); out.print("<HERE>"); out.print(" VALIDATING SIGNATURE "); out.print("<br>"); message.validateSignature(accessor); result = true; out.print("REQUEST STATUS::"+result); out.print("<br>"); } catch(OAuthProblemException ope) { out.print("<br>"); out.print("OAuthProblemException-->"+ope.getProblem()); } ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Result: ---------------------------------------------------------------------------------------------------------------------------------------------------------------- *** OAuthMessage Params [Before calling:validateSignature() method] *** Param Name-->opensocial_ownerid Value-- >00611319245665564774 Param Name-->oauth_signature Value-- >PK9mTYeIoav4onvmzlC49hlG3e6AXJscH lqJpnFFUKt2OVoPzoNH653E2VIMVfrXFJkthJuYJ8MTRriva6a7qIlwMw6CNgjRDYK0iBC86Oef naoqSrIB82pUmFCPKofB7cNWM3N97V4Ay4bhccpSzmO88rp1LGzQE52h71WMn48 = Param Name-->oauth_nonce Value-->41f92a56fccffc13 Param Name-->opensocial_appid Value-- >14870803059808603830 Param Name-->xoauth_signature_publickey Value-->pub. 1199819524.-1556113204990931254 .cer Param Name-->oauth_signature_method Value-->RSA-SHA1 Param Name-->oauth_consumer_key Value-->orkut.com Param Name-->opensocial_viewerid Value-->00611319245665564774 Param Name-->oauth_token Value--> Param Name-->oauth_timestamp Value-->1206081149 VALIDATING SIGNATURE OAuthProblemException-->signature_invalid ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Best Regards, RS --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---