Create a Mobile Backend in Oracle Mobile Hub

With Oracle Mobile Hub, you can develop mobile client-server applications and deploy several APIs designed to support tasks like user management, database access, location services, analytics, etc. These APIs make integrations with other Oracle Cloud solutions, REST Services, and mobile client applications possible.

About Mobile Backends

A mobile backend within Oracle Mobile Hub is a group of secure APIs and other resources used for developing client-server mobile applications.

You can use Oracle Mobile Hub to group and manage different APIs that together define a mobile backend.

In Oracle Mobile Hub, you can have multiple backends, each serving different client mobile applications. However, you can also have multiple APIs shared among different backends. The following image shows a typical mobile backend architecture in Oracle Mobile Hub:

Description of mobile-backend-architecture.jpg follows
Description of the illustration mobile-backend-architecture.jpg

When a client mobile application accesses an API through Oracle Mobile Hub, it's always within the context of a mobile backend. The application can authenticate using credentials defined within Oracle Mobile Hub (OAuth or basic HTTP authentication) specific to the mobile backend or through an identity store (or social log-in provider) that is mediated by your mobile backend. If the called API includes calls to other APIs within the backend, the identity and credentials of the original caller are propagated through the chain of calls.

Working in mobile backends helps you to visualize the resources available for the target apps and how they will work together. In addition, you can use the mobile backend security context to test calls to your APIs, even in the earliest stages of development.

Create a Mobile Backend in Oracle Mobile Hub

In Oracle Mobile Hub, you can create mobile back-ends to associate APIs, and storage collections, and then integrate them with your client-side mobile applications.

To create a mobile backend in Oracle Mobile Hub:
  1. Sign in to Oracle Mobile Hub.
  2. Click the menu icon, and then select Development, and then Backends.
  3. Click New Backend.
  4. Enter a name and a description for the mobile backend.
  5. Click Create.
    The mobile backend is created and its Settings page opens.
  6. Under the Settings page, enable the option for OAuth Consumer.
  7. Click the Enable Single Sign-On checkbox.
After you create your backend, it should appear in the Applications section of Oracle Mobile Hub under Mobile Backends.

Learn About Mobile Backend Authentication and Connection Details

You can check your mobile backend authentication and connection details in the Oracle Mobile Hub Settings page. Applications use this information to connect to and authenticate with APIs that are associated with a mobile backend. The authentication details that you can find in the Settings page are the environment URLs and access keys.

Environment URLs

This section contains three URLs:

  • Base URL: Required for all API calls.

  • OAuth Token Endpoint: Necessary for handling OAuth token requests.

  • SSO Token Endpoint: Shown when the Enable SSO checkbox is enabled and the OAuth Consumer option is turned on. Your application uses this URL to obtain a single sign-on OAuth token to sign-in through a remote identity provider.

Access Keys

This section contains the access keys that applications need to access mobile backend APIs. Oracle Mobile Hub generates both OAuth and HTTP Basic authentication. OAuth keys include a client ID and a client secret, while HTTP Basic authentication keys are generated in the form of a mobile backend ID and an anonymous key.

Associate an API with an Oracle Mobile Hub Mobile Backend

Before using your mobile backend, you need to associate an API. You can use theOracle Mobile Hub API Catalog to select the custom APIs you want to access with your mobile backend. This catalog provides details about each API endpoint and documentation. It also lets you test your endpoints with sample data.

To associate APIs with your mobile backend make sure you are in the environment that contains the draft mobile backend.
  1. Sign in to Oracle Mobile Hub.
  2. Click the menu icon, and then expand Development and click Backends.
  3. Select your mobile backend and click Open.
  4. Click APIs.
  5. Click Select APIs.
  6. Click the add icon for each API that you want to include in your mobile backend.