Hi Sumedha, We tried it also. But it didn't work and giving the same issue.
Thanks, Lakshitha Harshan Software Engineer Mobile: *+94724423048* Email: hars...@wso2.com Blog : http://harshanliyanage.blogspot.com/ *WSO2, Inc. :** wso2.com <http://wso2.com/>* lean.enterprise.middleware. On Mon, May 18, 2015 at 9:47 AM, Sumedha Rubasinghe <sume...@wso2.com> wrote: > Try sending without scope=openid. > > On Sat, May 16, 2015 at 6:22 AM, Prabath Abeysekera <praba...@wso2.com> > wrote: > >> IS Team, >> >> Please review the issues reported below and see if you could help us >> resolving them. Appreciate if we can get some feedback on this some time >> soon. >> >> Cheers, >> Prabath >> >> On Fri, May 15, 2015 at 8:57 PM, Harshan Liyanage <hars...@wso2.com> >> wrote: >> >>> Hi Guys, >>> >>> *Issue 1* >>> >>> When calling the token endpoints to generate oauth tokens using curl, >>> i'm getting a "unsupported_client_authentication_method" exception. Please >>> find the request & response below. >>> >>> Request >>> curl -v -X POST -H "Authorization: Basic >>> WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh" >>> -k -d "grant_type=password&username=admin&password=admin&scope=openid" -H >>> "Content-Type:application/x-www-form-urlencoded" >>> https://localhost:9443/oauth2/token >>> >>> Response >>> {"error":"unsupported_client_authentication_method","error_description":"Unsupported >>> Client Authentication Method!"} >>> >>> OAuth Debug logs >>> [2015-05-15 20:32:30,103] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> Received a request : /oauth2/token >>> [2015-05-15 20:32:30,103] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> ----------logging request headers.---------- >>> [2015-05-15 20:32:30,104] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> user-agent : curl/7.37.1 >>> [2015-05-15 20:32:30,104] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - host >>> : localhost:9763 >>> [2015-05-15 20:32:30,104] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> accept : */* >>> [2015-05-15 20:32:30,104] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> authorization : Basic >>> WkNZM1FDTmpLOXVqdEtYb016U2psdFBkVkZnYTpSUXZJMG8xejhOd2RZUzlJMnkzNXB3cHRNcDRh >>> [2015-05-15 20:32:30,105] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> content-type : application/x-www-form-urlencoded >>> [2015-05-15 20:32:30,105] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> content-length : 62 >>> [2015-05-15 20:32:30,105] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> ----------logging request parameters.---------- >>> [2015-05-15 20:32:30,105] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> grant_type - password >>> [2015-05-15 20:32:30,106] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> client_id - null >>> [2015-05-15 20:32:30,106] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - code >>> - null >>> [2015-05-15 20:32:30,106] DEBUG >>> {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - >>> redirect_uri - null >>> [2015-05-15 20:32:30,107] DEBUG >>> {org.wso2.carbon.identity.oauth2.OAuth2Service} - Access Token request >>> received for Client ID ZCY3QCNjK9ujtKXoMzSjltPdVFga, User ID admin, Scope : >>> [Ljava.lang.String;@1ff58e2a and Grant Type : password >>> [2015-05-15 20:32:30,107] DEBUG >>> {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} - Confidential >>> client cannot be authenticated for client id : ZCY3QCNjK9ujtKXoMzSjltPdVFga >>> [2015-05-15 20:32:30,108] DEBUG >>> {org.wso2.carbon.identity.oauth2.token.AccessTokenIssuer} - >>> OAuth-Error-Code=unsupported_client_authentication_method >>> client-id=ZCY3QCNjK9ujtKXoMzSjltPdVFga grant-type=password scope=openid >>> >>> >>> *Issue 2* >>> >>> There is an exception in the MDM console when try to renew the >>> access-token using API Store. "Exception occurred while trying to >>> invoke service method renewAccessToken" is displayed in API Store. >>> >>> [2015-05-15 20:49:33,884] ERROR >>> {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} - Exception >>> occurred while trying to invoke service method renewAccessToken >>> org.apache.axis2.AxisFault: Exception occurred while trying to invoke >>> service method renewAccessToken >>> at >>> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) >>> at >>> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370) >>> at >>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445) >>> at >>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) >>> at >>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) >>> at >>> org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceStub.renewAccessToken(APIKeyMgtSubscriberServiceStub.java:1187) >>> at >>> org.wso2.carbon.apimgt.keymgt.client.SubscriberKeyMgtClient.regenerateApplicationAccessKey(SubscriberKeyMgtClient.java:83) >>> at >>> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_refreshToken(APIStoreHostObject.java:3496) >>> 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) >>> at >>> org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) >>> at >>> org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) >>> at >>> org.jaggeryjs.rhino.store.modules.subscription.c2._c_anonymous_3(/store/modules/subscription/key.jag:61) >>> at >>> org.jaggeryjs.rhino.store.modules.subscription.c2.call(/store/modules/subscription/key.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.store.modules.subscription.c0._c_anonymous_10(/store/modules/subscription/module.jag:35) >>> at >>> org.jaggeryjs.rhino.store.modules.subscription.c0.call(/store/modules/subscription/module.jag) >>> at >>> org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) >>> at >>> org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0._c_anonymous_1(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag:220) >>> at >>> org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.call(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag) >>> at >>> org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23) >>> at >>> org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0._c_script_0(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag:3) >>> at >>> org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.call(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag) >>> at >>> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) >>> at >>> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) >>> at >>> org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.call(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag) >>> at >>> org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.exec(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.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.exec(WebAppManager.java:587) >>> at >>> org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:507) >>> at >>> org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378) >>> at >>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) >>> at >>> org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) >>> at >>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) >>> at >>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) >>> at >>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) >>> at >>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) >>> at >>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) >>> at >>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57) >>> at >>> org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticatorFrameworkValve.processResponse(WebappAuthenticatorFrameworkValve.java:46) >>> at >>> org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticatorFrameworkValve.invoke(WebappAuthenticatorFrameworkValve.java:38) >>> at >>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159) >>> at >>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) >>> at >>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) >>> at >>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) >>> at >>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) >>> at >>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) >>> at >>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) >>> at >>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739) >>> at >>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698) >>> at >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >>> at >>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) >>> at java.lang.Thread.run(Thread.java:744) >>> [2015-05-15 20:49:33,887] ERROR >>> {JAGGERY.site.blocks.subscription.subscription-add.ajax.subscription-add:jag} >>> - org.wso2.carbon.apimgt.api.APIManagementException: Exception occurred >>> while trying to invoke service method renewAccessToken >>> >>> >>> Thanks, >>> >>> Lakshitha Harshan >>> Software Engineer >>> Mobile: *+94724423048* >>> Email: hars...@wso2.com >>> Blog : http://harshanliyanage.blogspot.com/ >>> *WSO2, Inc. :** wso2.com <http://wso2.com/>* >>> lean.enterprise.middleware. >>> >> >> >> >> -- >> Prabath Abeysekara >> Technical Lead >> WSO2 Inc. >> Email: praba...@wso2.com >> Mobile: +94774171471 >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > /sumedha > m: +94 773017743 > b : bit.ly/sumedha >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev