oAuth 2.0 Authentication to access API

To be able to integrate our PIM system with Lightspeed (A retail POS) we need to authenticate through oAuth 2.0 in order to access their API. Currently I am not quite sure where to start with this authentication. Is this something that can be done with ''just'' some REST actions, or do I need to go through some more hoops. I came across the oAuthModule that has been built for Mendix, but this appears to be a Module that allows users to login the application through Facebook/Google/LinkedIn. Is this something that can be used to authenticate a webservice only oAuth implementation? Currently I'm a bit in the dark about oAuth and how to start implementing it (how to configure the Callback URI for example, what is this needed for/how should I configure this?). If anybody could provide some pointers to help me get started that would be great. 
3 answers

Hi Niels,

As explained in my email the OAUTH is pretty straight forward. Lightspeed provides:

API Key: 1234b76ac30fee47a0510c0430d465524
API secret: 12345n4a4a7dc5e676fe056630f2afa3

These are fake keys BTW.

In order to GET a list of products you can use URL below


The same goes for a POST. In the microflow you can add the JSON you want to post. Litghspeed documentation explains the format of the JSON string.





There are more OAuth modules in the appstore and none are from Mendix itself so I do not know which module you looked at.

You have the Social authentication from Andries Smit (https://appstore.home.mendix.com/link/app/1206/Flock-of-Birds/Social-Authentication ) and you have the Open Authentication module from Erwin 't Hoen (https://appstore.home.mendix.com/link/app/1414/FlowFabric-BV/Open-Authentication-Module ). The Open Authentication module has some  good documentation on how to start. Erwin is very active on the forum so if you run into problems he probably is willing to give you pointers.




And it seems that in this forum post is about the same use case https://forum.mendix.com/link/questions/85655



I've done a several  oAuth implementations (with Google and ADFS). I think a can  create a generic module but don't expect this be ready for the appstore the upcoming days ;) when do you need it?