LDAP Authentication for Native API in MobileFirst Platform Foundation - ibm-mobilefirst

I am looking for reference and tutorial of MobileFirst Platform Foundation provided LDAP authentication.
AFAIK and as far as I can get from sources out there, MFPF provides LDAP auth for hybrid app only as can be read from here.
I followed this tutorial to create native API and import all MFPF jar into native project and tried to import com.worklightcore.auth.ext.ldapLoginModule as seen from example code in hybrid below, but can't.
Does Worklight supports LDAP auth for native?

Tried to import it where? What exactly did you try to import?
This is all server-side, so while the sample project contains a Hybrid application - the LDAP part is a server-side component (as it is defined in the authenticationConfig.xml file) and is valid for native apps as well.
Be it Hybrid or Native, both would communicate with the server via an adapter.
Be it Hybrid or Native, the adapter and any server-side configuration, including LDAP, is done in the MobileFirst project in Eclipse, and not in the native project (Xcode, Android Studio and so on).
You will need to better illustrate what you have done.
Even better, provide your native project for later debugging.
You can also take the LDAP sample project and keep it as-is.
Only add a NativeAPI, copy over the SDK files into your native project and implement in the native app the same client-side code done in the Hybrid app (adapter calls, logic, if there's a challenge handler then that as well).

Related

How can I add Microsoft authentication to my react native app?

I have a React-Native application in development that is an extension of a current web application. The web application makes use of MSAL to authenticate the users and I want to do this as well with the mobile app.
I have not really managed to find anything relevant, and what I have found was out of date or for the ReactJS framework.
I have been trying to make use of the MSAL-react-native component however it isn't that well documented so I'm lost over there as well
Use react-native-msal for Microsoft authentication
Enable authentication in your own React Application by using Azure Active Directory B2C:
For more information please check: https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-react-spa-app

Is there a react-native library with Azure AD broker authentication for MDM devices

I am building a cross platform application with React Native for MDM managed devices. The authentication to the Azure AD should be SSO (automatically based on the work profile / intune information) and not through a classic WebView.
I heard that this could be done by Broker Authentication Support (e.g. for Microsoft Authenticator) but I couldn't find any library supporting that. I've tried following libraries but most of them are not maintained anymore or they are following the WebView approach: react-native-ms-adal, react-native-azure-adal, react-native-azure-ad.
Has anyone build such an use case or does know a working library?
• To enable broker authentication support for react native applications on Azure AD MDM managed devices, you will have to ensure that the following method is enabled for broker component support in ADAL for Android 3.0.0: -
Microsoft.ADAL.AuthenticationSettings.setUseBroker(true);
Developer needs to register special ‘redirectUri’ for broker usage. ‘RedirectUri’ is in the format of ‘msauth://packagename/Base64UrlencodedSignature’. Thus, since ADALis deprecated and MSAL is in place for it, you will have to use MSAL for Android 3.0+ library. For that purpose, you will have to install dependencies and declare it on MSAL as below: -
dependencies {
implementation 'com.microsoft.identity.client:msal:3.0.+'
}
Thus, in this way, you can configure Azure AD broker authentication in MDM devices. For more information, kindly refer to the below documentation link: -
https://github.com/AzureAD/microsoft-authentication-library-for-android
https://github.com/northwesternmutual/azure-activedirectory-library-for-react-native/blob/master/README.md#android-quirks

Corda & React Native compatible?

Is Corda compatible with React Native?
What is the best way to develop a mobile application with Corda?
You can achieve that, but you need several moving parts:
A Braid webserver which detects your flows and generates Open API compatible templates.
An Open API Generator which translates those templates into an API library (in NodeJS for instance).
A React front-end.
You can find an example implantation of the above approach here.
I also wrote an article about Braid here.
Corda Node cannot be run on a mobile device. Hence a mobile app and a CorDapp would be separate components.
You could build your mobile app using react-native.
The mobile app could connect to a Corda node using REST API exposes by a client.
The client connects to the node using RPC and relays user inputs to the node.

Shoutem - How does it work for custom backend/integrations?

Interested to learn more about the product. The frontend seems very straightforward. What I'm curious about is how much "backend" services your tools supply? For features that you run the backend for, is there API access?
This is the use case I'm trying to understand. If we were to sign up as an agency, would we be able to 1) create an app with your system 2) add custom features/native modules/etc and 3) connect that app to a custom dashboard which we run ourselves
From the backend services, Shoutem has its own Cloud Storage to manage your data in the app and Automated app publishing tool for publishing your app to both stores. You can customize Shoutem Cloud with your data models.
To answer other questions:
Yes, everyone can create their app on Shoutem.
Shoutem is just an architecture on how to create React Native apps. Apps are divided into smaller building blocks, called extensions. This architecture enables developers to reuse extensions in multiple apps which leads to more efficient app development process. You can build your custom extension and that extension can use any feature from React Native,
including native functionalities. We made sure not to restrict you on how you can use React Native.
Our extensions are by default connected with Shoutem CMS. Since they are open sourced, you can customize them to use your own backend instead. For your own extensions, you chose which dashboard they are going to use.
Extensions are built from 2 parts: app part and server part. App part represents application logic, while server part allows the customization of Shoutem Server including Dashboard and CMS. For Dashboard, you can write Settings pages which can be hosted anywhere, including on your own backend.
All the underlying concepts are explained on Shoutem's Developer portal: shoutem.github.io

Does Mobilefirst provide a provision to access web services directly?

I am developing a native android app on MobileFirst platform. Does MobileFirst provide any code to connect to a web service instead of going through adapters? This is basically only for Native Android development and not for Hybrid app.
The MobileFirst SDK only provides what is required to work with features provided by MobileFirst, such as connecting to various backends using Adapters with the added benefit of the MobileFirst security framework, and other features.
If you have a need to connect to backends not via MobileFirst, use other common client-side utilities to achieve that.
I used the following code and it worked.
WLResourceRequest request = new WLResourceRequest("Actual server path here", GET);
request.addHeader(new BasicHeader("IfAnyHeader", "here"));
request.send(new ResponseListener());
If you are using native Android, you could use volley (or similar) to call external web services or REST apis.
http://developer.android.com/training/volley/index.html
Nothing to do with MobileFirst though, all totally standard Android native coding.