Git Product home page Git Product logo

aemmobile-example-entitlement-server's Introduction

AEM Mobile Example Entitlement Server

Using an entitlement service, Experience Manager Mobile Runtimes can support user login and grant access (entitle) to certain collections based on the sign-in credentials.

This README provides a quick usage guide to the example entitlement server. For full walkthrough, please refer to the following help article: Set up an entitlement service.

This entitlement service now supports the use of Google or Facebook as the Identity Service provider. To do so, update the $identity_provider value in Configuration to either Google or Facebook. In addition, there is the generic identity provider. To use the generic identity provider, leave the $identity_provider value as is. Please refer to the following help article on use custom authentication in AEM Mobile apps.

NOTE: The example implementation is to be provided as is, Adobe will not provide support on the code, the implementation, or the deployment process. If you have questions about the implementation, please refer to the AEM Mobile forum.

Table of Contents

  • A server with MySQL and PHP installed.
  • A MySQL user account from the server.
  • An AEM Mobile user account
  • Prerequisite Knowledge: Basic understanding of MySQL and PHP
  1. Navigate to the phpMyAdmin page on the server with MySQL and PHP installed
  2. If prompted to log in, enter the database username and password.
  3. Navigate to the page to create new database in the MySQL database, by clicking either the New option on the left sidebar or the database tab on the top navigation bar.
  4. Enter the database name entitlement_admin (preferably), or a name of your choice, into the Database name field on the page.
  5. Generate the new database with name entitlement_admin, or the name you entered in step 3, by clicking the Create button on the right.
  6. Select the new database by clicking the new database name in the list.
  7. Navigate to the import page to import the necessary database structure, by clicking the Import tab on the top navigation bar.
  8. Open the browse window to select the existing database (.sql) by clicking the Choose File option.
  9. Select the existing database file from the new window, entitlement_admin.sql, and click the Choose button to confirm.
  10. Upload the selected database (.sql) by clicking on the Go button.
  11. If the database was successfully created, there will be a message similar to the following: Import has been successfully finished.
  • Open the file settings.php with an text editor, located in the <source-code>/php/settings.php, and update the values for the following parameters:
    • $db_host, set this to the MySQL host name
    • $db_user, set this to the MySQL account user name, default is root
    • $db_password, set this to the MySQL account password, default is root
    • $db_name, set this to the MySQL database name, created in step 3 of MySQL installation process.
    • $admin_list, set this with the list of administrative users with access to the entitlement server.
    • $identity_provider, set this with the identity provider name: default, google, or facebook.
  • Upload all the source code to the root directory of a server with MySQL and PHP installed.
  • Navigate to the index.html page from the server to see the login screen.

Identity Providers

This example entitlement server supports the usage of Google, Facebook, or Generic Identity Provider. When using Google or Facebook, the AEM Mobile Runtime will provide the authToken in the Entitlement V2 API: /entitlements. When using Generic Identity Provider, the Runtime will redirect users to the provided custom sign in UI.

Using Google or Facebook as the Identity Provider

Since there is not a clear way (100%) of telling apart if the authentication token is from Google or Facebook, you will need to set the $identity_provider to either "google" or "facebook", respectively. This value can be found in <source-code>/php/settings.php.

Using Generic Identity Provider

The generic identity provider can be found in <source-code>/idp directory. From the domain that this example entitlement server will be hosted in, the authentication URL would be as follows:

http://<domain>/<path-to-source-code>/idp/index.html

aemmobile-example-entitlement-server's People

Contributors

huacyang avatar paolomoz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.