Reputation: 790
I'm trying to implement NetSuite with an external application. My application is embeded to run in an iframe, so I'm using a portlet to load it up and simply display it. Now, the issue is that my app uses OAuth 2.0 for authentication and I would like the users to be able to login using this. NetSuite doesn't seem to provide any kind of support or straightforward way to do this, so I tried to elaborate something on my own.
The idea I had was to configure the app to redirect to a NetSuite restlet to exchange auth_code for tokens and finally get and save the token, but I couldn't make it work for several reasons.
First, RESTlets calls coming from external applications need to have all the authentication headers required by NetSuite.
Second, even if I was able to pull that off, how am I supposed to save the token in a secure way and use it on every subsecuent call on my application? (which again, runs inside an iframe).
In short, I don't see any light at the end of the tunel and was wodering if anybody was able to work this out.
Thanks in advance for all your help.
Upvotes: 0
Views: 777
Reputation: 2069
You can use Restlet to communicate with NetSuite for that you'll need to enable Tokens based authentication in NetSuite. Also you'll need to create an app in NetSuite and generate OAuth tokens in NetSuite and save them in your app or server whichever you are going to use and then use these tokens to communicate with NetSuite.
Upvotes: 2