Tuesday, 27 September 2016

AEMM: How to create custom authentication

There are cases where we need to use custom login screen other than the login UI provided by AEMM. In such cases we need to use generic auth method in AEMM with custom UI hosted in our own server. Below given the approach.

We need to have our own API authentication mechanism running to achieve the functionality. In this case our system exposes an API which gives status as success or failure while authenticating in JSON format
Click on image to see it big

Step 1:
Create a login form which accepts user credentials

<form onsubmit="loginfunctioncall();"> 
Username: <input type="text" /> 
Password: <input type="text" /> 
<input type="submit" /> </form>

Step 2:
Add a post method which takes the response and  collects user info. This info is processed to respective format as our API requires.
Do a post call and get response.
Process the response(JSON format) back from POST and check the authentication is success
If authentication is success, redirect the user to app home screen, else alert user with an error message

function login() {

//process response and if authentication is success, set the success to true
var success = true;
if (success && authToken) {
window.location = appData.redirectUri + '?authToken=' + authToken;  } else {
window.location = appData.redirectUri + '?error="Internal Error"';  } }

AEM Mobile Integration with third party application for authoring

There are cases where we need to create third party web portals to use for authoring instead of using AEMM authoring. Advantage of using such system is to isolate authoring from AEMM environment. To setup an independent suthoring, AEM Mobile supports API services. Below are the steps involved.

Click on image to see it big

Webportal is a third party application, which can be created to author in AEM Mobile. Web portal interacts with AEM Mobile using the on demand API's provided by AEM Mobile.

Web portal can be created in any language which will have its own database used for authentication and then for authoring AEMM content.

AEMM master admin should create an AEMM user with content creation access permissions. This user can be configured in webportal then.

We need to have AEM Mobile API access obtained from Adobe to interact between AEM Mobile and web portal application. (See section: 'Requesting an API key' )

Webportal helps to upload AEM Mobile page content once logged in, and on submission it creates '.article' files with its manifest file using On Demand API. This creates .html file through its service.

To generate the article files from a folder, you can either use the desktop utility or use the example packager in ‘class/manifest.php’.

On-demand api push this article to AEMM using created AEMM content creation web portal user id.

To script the export process, you can use the ‘exportDpsArticle’ function. For details, see Creating InDesign-based articles using scripting.

Sunday, 18 September 2016

AEM Mobile Overview

Adobe Experience Manager Mobile(AEM Mobile/ AEMM)

AEM Mobile:
Adobe PhoneGap was one of the finest solution for enterprise level organizations to create and manage mobile application quickly.
AEM Mobile is an evolution from phone gap which enables its users to produce, manage and maintain their mobile apps from centralized server.


  • Existing contents can be migrated easily to AEM Mobile
  • Cloud managed, so centralized
  • Simple to custom complex level apps
  • Real time app update notifications
  • Simple apps can be developed by non technical users
  • Installable on multi platforms
  • Highly extensible, which can be customized to any level with its article collection combination
  • Ease in content publishing
  • Easily integrated with Adobe Analytics
  • Personalized content distribution

Steps in AEMM(AEM Mobile) app development includes

  1. Create app
  2. Integrate data
  3. Manage and publish app
  4. Measure the data usage

AEM Mobile Pre-flight APP

 This app allows user to test and preview AEM Mobile app and content on-device, before you publish it. This is a kind of testing sandbox which helps you ensure your content appears the way you wanted it when viewed on a device. Entire testing which includes, app navigation, browse pages, interactivity and authentication levels.

We are going to add more details on below topics for AEM Mobile
How to create custom authentication?
Third party Authoring for AEM Mobile
How entitlement can be done?

Subscribe this blog for more write-ups on AEM Mobile development.