worklight-adapters

How to implement OAUTH 2.0 in IBM Worklight 6.0

允我心安 提交于 2019-12-07 08:02:01
问题 In my app I have implemented Login module auth security by implementing security realms. But i am thinking of implementing a OAUTH2.0 authentication where user will be authenticated once I will get a token and re-validate than on app starts. So please one guide what are the prerequisites to implement this. Can I achieve this by creating a custom authentication module ? Any guide sample code will be really helpful. 回答1: There is an article that was published that shows how to use OAuth with

How to implement OAUTH 2.0 in IBM Worklight 6.0

你离开我真会死。 提交于 2019-12-05 17:25:43
In my app I have implemented Login module auth security by implementing security realms. But i am thinking of implementing a OAUTH2.0 authentication where user will be authenticated once I will get a token and re-validate than on app starts. So please one guide what are the prerequisites to implement this. Can I achieve this by creating a custom authentication module ? Any guide sample code will be really helpful. Joshua Alger There is an article that was published that shows how to use OAuth with inappbrowser and Worklgiht using LinkedIn found at the following location: http://www.ibm.com

IBM Worklight - Include a JavaScript library on the server side

╄→尐↘猪︶ㄣ 提交于 2019-12-04 09:33:38
I'm building a mobile application using IBM Worklight. In an adapter, I need to use some functionality which is provided by a third party JavaScript file. I want to know if it's possible to include such a file on the server? If not, what is the alternative? At the moment there is no way to include an external JavaScript library in the Adapter code. Currently the only workaround is to copy the library code to the adapter. In Worklight 6.0.0, IBM introduced Node.js adapters, touting "a huge selection of third-party modules extending connectivity and providing implementations of various common

Passing parameters through HTTP Adapter?

江枫思渺然 提交于 2019-12-04 05:27:29
问题 I want to send an email to the user after he/she sign's up in my hybrid application (based on IBM Worklight 6.0). I want to pass the parameters (email ID) of the user to a PHP file hosted. I tried directly to send a mail in the URL as Follows, and this works: http://www.xxxyyyzzz.comli.com/email.php?a=someEmailAddress@someEmailHost.com How to do the same via a Worklight adapter? ADAPTER.XML <wl:adapter name="sendmail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wl="http://www

What does the cookiePolicy adapter parameter do in Worklight 6.1+?

与世无争的帅哥 提交于 2019-12-02 19:47:50
问题 The Worklight 6.1 InfoCenter refers to a cookiePolicy parameter which can be set on an HTTP adapter. It mentions four possible values, but doesn't go into details about what they do. Is it safe to assume they all preserve cookies they are returned from the back-end HTTP service? How does that relate (if at all) to the JSESSIONID cookie that may be shared between the Worklight server and any back-end server? Do all calls from that adapter share the same cookie state, or does it depend on the

IBM Worklight - How to pass parameters from the application to the adapter?

二次信任 提交于 2019-12-02 13:40:07
问题 I want to pass parameters from the application to the adapter; I want the users of the app to enter these options. Right now I am passing the parameters like this in adapter: function getFeeds() { WL.Logger.debug("inside method"); var input = { method : 'get', returnedContentType : 'json', path : "ios/clientRegister.php", parameters:{ "employeenumber":"500","employeename":"Harish","employeeemail":"anand5@gmail.com","city":"Delhi", "employeeadID":"an6458","businessUnit":"WASE","country":"India

IBM Worklight 6.1 - “Ecma Error: TypeError: Cannot call property <function> in object”

寵の児 提交于 2019-12-02 10:53:01
问题 I'm trying to run the Java in Worklight Adapters example from the worklightadapterproject smaple project, but I am facing an error when trying to invoke a procedure: { "errors": [ "Ecma Error: TypeError: Cannot call property addTwoIntegers in object [JavaPackage com.worklight.customcode.Calculator1]. It is not a function, it is \"object\". (C%3A%5CWorklightLab%5Cworkspace%5CWorklightAdaptersProject%5Cadapters%5CCalculatorAdapter\/CalculatorAdapter-impl.js#9)" ], "info": [ ], "isSuccessful":

What does the cookiePolicy adapter parameter do in Worklight 6.1+?

一世执手 提交于 2019-12-02 10:04:23
The Worklight 6.1 InfoCenter refers to a cookiePolicy parameter which can be set on an HTTP adapter. It mentions four possible values, but doesn't go into details about what they do. Is it safe to assume they all preserve cookies they are returned from the back-end HTTP service? How does that relate (if at all) to the JSESSIONID cookie that may be shared between the Worklight server and any back-end server? Do all calls from that adapter share the same cookie state, or does it depend on the security realm being used? The cookiePolicy parameter in a HTTP adapter defines the way the adapter's

IBM Worklight 6.1 - Failed connecting to MS SQL using SQL adapter

孤人 提交于 2019-12-02 08:30:41
问题 I am trying to connect my adapter to a SQL Server 2012 Express database, but I can't quite get it right. I have downloaded a connector from here: http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx, and added it to the server\lib folder in Worklight Studio. My definitions looks as follows: <dataSourceDefinition> <driverClass>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClass <url>jdbc:sqlserver://localhost:1433;database=MyDB</url> <user>MyUser</user> <password>MyPassword</password>

how to perform xslt transformation for input request in adapter

為{幸葍}努か 提交于 2019-12-02 08:01:15
i have created a XSLT for the WL.Server.invokeHttp which gets the data from the backend server in XML format and performing transformation successfully. this adapter is used to get the data from backend server. but while sending data to server in XML , as i am getting data in adapter as JSON , i need to transform it into XML using XSLT. is there any provision in ibm worklight adapters that i can perform XSLT transformation for input request just the way i can do it easily while getting response from backend server. Here i am explaining the return data ( i.e. response) for example, if i want to