1. What is API in general?
API generally stands for Application Program Interface. It creates a bridge / medium for two different software programs / units.
2. What is Third Party API’s?
Let’s say that the business leaders are planning for increasing the efficiency and proficiency of their business in terms of growth.
So they would create the set of processes or software programs (Server) which then it provides the service to their clients (Client) with the help of API.
Producer:- An Entity who produces the API’s to serve their clients.
Consumer:- An Entity who consumes the produced API’s from their Service Provider.
3. Advantages of Thrid Party API integration in Mendix:
It takes more time and cost while Integrating third-party API’s in Traditional Application.
For Instance, Implementing SSO Single Sign-On Mechanism in traditional app development ( Angular / React as a client-side scripting with NodeJS / Java / Ruby as a server-side scripting ).
In general, to implement SSO, we need to create an application in IdP – Identity Protocol ( Like Okta, Lastpass, OpenIDConnect, Keycloak ).
To implement SSO in the traditional application, it would hardly take 6 – 8 hours, since we need to configure those IdP credentials in SP’s – Serivice Provider’s with the help of SAML Module.
SAML stands for Security Assertion Markup Language is an open standard for exchanging authentication and authorization data between parties, in particular, between an identity provider and a service provider.
Whereas in mendix, implementing an SSO Mechanism is a low-code platform, so by integrating MxModelReflection, SAML Mendix App Store modules and Mendix defaults actions and java actions.
By making use of SAML Module we would be easily able to configure the IdP details.
4. Processes and Challenges while implementing OKTA Third-party API in Mendix:
- Scalability of Mendix application always rely on the service team and quite frustrating to get in touch with the Mendix providers
- Frequency of updating the modelers
- One needs to get always touch with the technology in order to standardize your collaboration with the API
Let’s see the sample Mendix – SSO Application creation with the help of OKTA Third party API.
- Mx Model Reflection
- SAML 2.0
- Okta account https://www.okta.com/
SSO Process flow diagram:
Mx Model Reflection setup
- Create a mendix application.
- Add “Mx Model Reflection” from mendix app store
(Note: Mx model reflection is necessary for SAML to operate)
SAML Module setup:
- Add Mx model reflection module.
- Add “SAML 2.0” module from app store.
- At this point 2 errors will be displayed.
- Click on the first error and go to the page -> right click -> properties -> master layout -> Change to (Model pop Layout).
- Drag the “Main” to the Main sector and delete the content header.
- Goto Navigation -> new item -> On click -> Call a micro flow ( select the micro flow SAML20 / _USE ME / Examples / Open configuration) this is where the saml can be configured.
Check out our articles on Mendix
SAML Configuration at Runtime:
- Run the application
- From the navigation select “Open Configuration” tab
- Click “SP Configuration” tab and Enter the details as per the Organization information. Eg: Organization Url: http:localhost:8080/
- Copy the Entity id .
- Click Save button to save the details.
Okta – App creation:
- Sign in to okta.com as developer.
- Go to Admin section -> Click “Applications” tab
- Click Add Applications – > Create new Application -> Select SAML 2.0 application
- Provide an application name and logo
- In SAML settings Provide the following details
- Single sign on url: Organization Url.
- Audience URI (SP Entity ID) : Paste the Entity id copied from SAML Configuration.
- Provide the attribute details as
FirstName and select user.firstName from drop down.
LastName and select user.lastName from drop down.
Email and select user.email from drop down.
- Click the radio “I’m an Okta Customer adding an integrated app
- Select APP type as “This is an Internal app that we have created “
- Click finish to save the details.
- Now, the new page would be opened which would have four tabs such General, Sign on, Import and Assignments.
- Under Sign on tab, there would be a link for identity provider metadata and copy the url.
- Click Assignments tab, select people from assign dropdown.
- Click assign and save, then go back.
- Click done.
- Example of Identity Provider Metadata URL
- Run the Mendix application
- Click Open Configuration
- Click new in IdP Configuration
- Click ok for the information pop up displayed and click next button.
- Enter any name as alias name
- Paste the metadata URL in the textbox click next
- Check “Allow Idp Initiated Authentication and click next
- Leave the IdP attributes as “IdP Provided ” and click next
- No need to select anything click next
- Click Submit.
- Select the IdP and press “toggle active” tab.
That’s it. Here we go, save and run the application.
and check the url : http://localhost:8080/sso/
It just takes hardly 45 minutes to 1 hour, and it saves around 5 – 7 hours approximately when comparing to traditional app development. That’s the beauty and impact of Mendix.
Tools for Mendix integration
To handle integrations, Mendix offers a wide array of tools:
Message definition – Specify the messages that are being exchanged with external systems.
Mappings – Leverage visual specifications on how to translate external messages from and to entities in Mendix applications.
Web services – Microflows should be published as web service operations, with external web services called from microflows.
REST services – Microflows and entities should be published as REST resources and operations, with external REST APIs called from microflows.
Database integration – Database connector in Mendix enables to configure direct JDBC connections to your chosen database to execute stored procedures and SQL queries.
This blog post covers implementing 3rd Party API’s Mendix Integration. This offer’s a number of unique advantages over more traditional development.
Furthermore, we have demonstrated that Mendix application deployments could be much simpler than ever expected