Hi Dilhasha,

Please check whether there is a way to specify 'signature_method' in your
configuration so that it will be set in OAuthRequest object as the value of
OAuthConstants.SIGN_METHOD parameter.

On Wed, Apr 8, 2015 at 7:26 PM, Fathima Dilhasha <[email protected]> wrote:

> Hi Buddhima,
>
> Thank you. JIRA is using RSA encryption in their OAuth Process. May be
> that is the reason for the exception. I'll debug and see.
> (I am using 0.9.0.ALPHA4.wso2v6-release of Jaggery.)
>
> Thanks.
> Regards,
> Dilhasha
>
>
> *M.N.F. Dilhasha*
> Software Engineering Intern | *WSO2 Inc.*
>
> email   :
> *[email protected] <[email protected]>*mobile : +94 77 8449321
>
> On Wed, Apr 8, 2015 at 6:55 PM, Buddhima Wijeweera <[email protected]>
> wrote:
>
>> Hi Fathima,
>>
>> The blog post mentioned [1], needs changes in PR
>> https://github.com/wso2/jaggery-extensions/pull/9, (I have mentioned it
>> in the post).
>>
>> The given sample is working after those changes applied.
>>
>> Thank you!
>>
>> On Wed, Apr 8, 2015 at 12:27 PM, Fathima Dilhasha <[email protected]>
>> wrote:
>>
>>> The configs I'm using are as follows
>>>
>>> var configs = {
>>>        'oauth_version'     : '1',
>>>        'authorization_url' : '
>>> https://dilhashatest.atlassian.net/plugins/servlet/oauth/authorize',
>>>       'access_token_url'  : '
>>> https://dilhashatest.atlassian.net/plugins/servlet/oauth/access-token',
>>>        'request_token_url' : '
>>> https://dilhashatest.atlassian.net/plugins/servlet/oauth/request-token',
>>>       'api_key'           : 'hardcoded-consumer',
>>>       'api_secret'        : '*********************************',
>>>       'callback_url'      : '
>>> https://apps.appfactory.private.wso2.com:9443/appmgt/site/pages/issuetracker.jag?applicationName=Hello&applicationKey=hello
>>> '
>>>  };
>>>
>>>
>>> I got these values from [2]
>>> <https://www.prodpad.com/2013/05/tech-tutorial-oauth-in-jira/>
>>>
>>> Thanks.
>>>
>>> [2] https://www.prodpad.com/2013/05/tech-tutorial-oauth-in-jira/
>>>
>>> *M.N.F. Dilhasha*
>>> Software Engineering Intern | *WSO2 Inc.*
>>>
>>> email   :
>>> *[email protected] <[email protected]>*mobile : +94 77 8449321
>>>
>>> On Wed, Apr 8, 2015 at 12:11 PM, Fathima Dilhasha <[email protected]>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to use the jaggeryJS host object for oauth (to access Jira)
>>>> within AppFactory as in [1]
>>>> <https://buddhimawijeweera.wordpress.com/2014/09/28/oauth-process-in-a-jaggery-application/>.
>>>> I'm getting an error in the following line.
>>>>
>>>> var authUrl = oauthService.getAuthorizationUrl();
>>>>
>>>> Can someone help me on this?
>>>>
>>>> The error I get is as follows.
>>>>
>>>> *TID: [0] [AF] [2015-04-08 06:22:05,642] ERROR
>>>> {module/issuetracker/getIssueSummaries.jag} -
>>>>  org.mozilla.javascript.WrappedException: Wrapped
>>>> org.scribe.exceptions.OAuthException: Response body is incorrect. Can't
>>>> extract token and secret from this:
>>>> 'oauth_problem=signature_method_rejected'
>>>> (/appmgt/modules/issuetracker/get/getIssueSummaries.jag#75)*
>>>> * at
>>>> org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)*
>>>> * at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)*
>>>> * at
>>>> org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)*
>>>> * at
>>>> org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.get.c1._c_anonymous_1(/appmgt/modules/issuetracker/get/getIssueSummaries.jag:75)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.get.c1.call(/appmgt/modules/issuetracker/get/getIssueSummaries.jag)*
>>>> * at
>>>> org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)*
>>>> * at
>>>> org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)*
>>>> * at
>>>> org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)*
>>>> * at
>>>> org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.c0._c_anonymous_4(/appmgt/modules/issuetracker/module.jag:32)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.modules.issuetracker.c0.call(/appmgt/modules/issuetracker/module.jag)*
>>>> *at
>>>> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1._c_anonymous_1(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag:15)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.call(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>>> * at
>>>> org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1._c_script_0(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag:9)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.call(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>>> * at
>>>> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)*
>>>> * at
>>>> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.call(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>>> * at
>>>> org.jaggeryjs.rhino.appmgt.site.blocks.issuetracker.list.ajax.c1.exec(/appmgt/site/blocks/issuetracker/list/ajax/getSummary.jag)*
>>>> * at
>>>> org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)*
>>>> * at
>>>> org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)*
>>>> * at
>>>> org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:541)*
>>>> * at
>>>> org.jaggeryjs.jaggery.core.JaggeryServlet.doGet(JaggeryServlet.java:24)*
>>>> * at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)*
>>>> * at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)*
>>>> * at
>>>> org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)*
>>>> * at
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)*
>>>> * at
>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)*
>>>> * at
>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)*
>>>> * at
>>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)*
>>>> * at
>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)*
>>>> * at
>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)*
>>>> * at
>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)*
>>>> * at
>>>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)*
>>>> * at
>>>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)*
>>>> * at
>>>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)*
>>>> * at
>>>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)*
>>>> * at
>>>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)*
>>>> * at
>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)*
>>>> * at
>>>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)*
>>>> * at
>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)*
>>>> * at
>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)*
>>>> * at
>>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)*
>>>> *at
>>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)*
>>>> * at
>>>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)*
>>>> * at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)*
>>>> * at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)*
>>>> * at java.lang.Thread.run(Thread.java:744)*
>>>> *Caused by: org.scribe.exceptions.OAuthException: Response body is
>>>> incorrect. Can't extract token and secret from this:
>>>> 'oauth_problem=signature_method_rejected'*
>>>> * at
>>>> org.scribe.extractors.TokenExtractorImpl.extract(TokenExtractorImpl.java:41)*
>>>> * at
>>>> org.scribe.extractors.TokenExtractorImpl.extract(TokenExtractorImpl.java:27)*
>>>> * at
>>>> org.scribe.oauth.OAuth10aServiceImpl.getRequestToken(OAuth10aServiceImpl.java:52)*
>>>> * at
>>>> org.jaggeryjs.hostobjects.oauth.OAuthHostObject.jsFunction_getAuthorizationUrl(OAuthHostObject.java:102)*
>>>> * at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
>>>> * at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)*
>>>> * at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
>>>> * at java.lang.reflect.Method.invoke(Method.java:606)*
>>>> * at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)*
>>>> * ... 56 more*
>>>> * {module/issuetracker/getIssueSummaries.jag}*
>>>>
>>>>
>>>> [1]
>>>> https://buddhimawijeweera.wordpress.com/2014/09/28/oauth-process-in-a-jaggery-application/
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Regards,
>>>> Dilhasha
>>>> *M.N.F. Dilhasha*
>>>> Software Engineering Intern | *WSO2 Inc.*
>>>>
>>>> email   :
>>>> *[email protected] <[email protected]>*mobile : +94 77 8449321
>>>>
>>>
>>>
>>
>>
>> --
>> Buddhima Wijeweera
>> Software Engineer; WSO2 Inc.; http://wso2.com ,
>>
>> Mobile: +94 71 427 9966
>> Email: [email protected]
>> Blog:   https://buddhimawijeweera.wordpress.com
>> GitHub Profile: https://github.com/Buddhima
>>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks and Regards,

Punnadi Gunarathna
Senior Software Engineer,
WSO2, Inc.; http://wso2.com <http://wso2>
Blog: http://hi-my-world.blogspot.com/
Tel : 94 11 214 5345
Fax :94 11 2145300



 <http://lalajisureshika.blogspot.com/>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to