new MobileBackend()
Represents a mobile backend in Oracle Mobile Cloud Service and provides access to all capabilities of the backend.
- Source:
Members
-
<readonly> Analytics :Analytics
Returns the Analytics object that enables capture of mobile analytics events.
-
Returns the Analytics object that enables capture of mobile analytics events.
Type:
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#analytics instead.
- Source:
-
analytics
Returns the Analytics object that enables capture of mobile analytics events.
-
Returns the Analytics object that enables capture of mobile analytics events.
- Source:
-
<readonly> AppConfig :Object
Returns an instance of the application configuration object.
-
Returns an instance of the application configuration object. Callers can download the configuration from the service by invoking loadAppConfig().
Type:
- Object
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#appConfig instead.
- Source:
-
appConfig
Returns an instance of the application configuration object.
-
Returns an instance of the application configuration object. Callers can download the configuration from the service by invoking loadAppConfig().
- Source:
-
authorization
Get current authorization object.
-
Get current authorization object.
- Source:
-
<readonly> Authorization :Authorization
Current authorization object.
-
Current authorization object.
Type:
- Deprecated:
-
- Will be removed in next version. Use MobileBackend#authorization instead.
- Source:
-
<readonly> CustomCode :CustomCode
Returns the CustomCode object that enables calls to custom APIs.
-
Returns the CustomCode object that enables calls to custom APIs.
Type:
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#customCode instead.
- Source:
-
customCode
Returns the CustomCode object that enables calls to custom APIs.
-
Returns the CustomCode object that enables calls to custom APIs.
- Source:
-
Diagnostics :Diagnostics
Returns the Diagnostics object that enables end-end debugging across application and cloud.
-
Returns the Diagnostics object that enables end-end debugging across application and cloud.
Type:
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#diagnostics instead.
- Source:
-
diagnostics
Returns the Diagnostics object that enables end-end debugging across application and cloud.
-
Returns the Diagnostics object that enables end-end debugging across application and cloud.
- Source:
-
<readonly> name :String
The name of the MobileBackend as read from the configuration.
-
The name of the MobileBackend as read from the configuration.
Type:
- String
- Source:
-
<readonly> Notifications :Notifications
Returns the Notifications object that provides notification capabilities.
-
Returns the Notifications object that provides notification capabilities.
Type:
- Notifications
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#notifications instead.
- Source:
-
notifications
Returns the Notifications object that provides notification capabilities.
-
Returns the Notifications object that provides notification capabilities.
- Source:
-
storage
Returns the Storage object that provides cloud-based object storage capabilities.
-
Returns the Storage object that provides cloud-based object storage capabilities.
- Source:
-
<readonly> Storage :Storage
Returns the Storage object that provides cloud-based object storage capabilities.
-
Returns the Storage object that provides cloud-based object storage capabilities.
Type:
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#storage instead.
- Source:
-
<readonly> synchronization :Synchronization
Returns the Synchronization object that provides caching and synchronization capabilities.
-
Returns the Synchronization object that provides caching and synchronization capabilities.
Type:
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#synchronization instead.
- Source:
-
synchronization
Returns the Synchronization object that provides caching and synchronization capabilities.
-
Returns the Synchronization object that provides caching and synchronization capabilities.
- Source:
Methods
-
getAuthenticationType()
Returns the Authentication type.
-
Returns the Authentication type.
- Source:
Returns:
Authentication type- Type
- String
-
getAuthenticationTypeVariable()
Returns the Authentication type.
-
Returns the Authentication type.
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#getAuthenticationType instead.
- Source:
Returns:
Authentication type- Type
- String
-
getCustomCodeUrl(path)
Constructs a full URL by prepending the prefix for custom API REST endpoints to the given endpoint path.
-
Constructs a full URL by prepending the prefix for custom API REST endpoints to the given endpoint path.
Parameters:
Name Type Description path
String The relative path of the endpoint following the platform prefix, i.e. {BaseUrl}/mobile/custom. - Source:
Returns:
The full URL.- Type
- String
-
getHttpHeaders(headers)
Populates auth and diagnostics HTTP headers for making REST calls to a mobile backend.
-
Populates auth and diagnostics HTTP headers for making REST calls to a mobile backend.
Parameters:
Name Type Argument Description headers
Object <optional>
An optional object with which to populate with the headers. - Source:
Returns:
The headers parameter that is passed in. If not provided, a new object with the populated headers as properties of that object is created.- Type
- Object
-
getOAuthTokenUrl()
Constructs a full URL, including the prefix, for the OAuth token endpoint.
-
Constructs a full URL, including the prefix, for the OAuth token endpoint.
- Source:
Returns:
The full URL for the OAuth token endpoint.- Type
- String
-
getPlatformUrl(path)
Constructs a full URL by prepending the prefix for platform API REST endpoints to the given endpoint path.
-
Constructs a full URL by prepending the prefix for platform API REST endpoints to the given endpoint path.
Parameters:
Name Type Description path
String The relative path of the endpoint following the platform prefix, i.e. {BaseUrl}/mobile/platform. - Source:
Returns:
The full URL.- Type
- String
-
getSSOAuthTokenUrl()
Constructs a full URL, including the prefix, for the SSO token endpoint.
-
Constructs a full URL, including the prefix, for the SSO token endpoint.
- Source:
Returns:
The full URL for the SSO token endpoint.- Type
- String
-
loadAppConfig(successCallback, errorCallback)
Downloads the configuration from the service.
-
Downloads the configuration from the service. The AppConfig property will contain the downloaded configuration.
Parameters:
Name Type Argument Description successCallback
MobileBackend~appConfigSuccessCallback <optional>
Optional callback invoked on success (deprecated use promises instead). errorCallback
MobileBackend~errorCallback <optional>
Optional callback invoked on failure (deprecated use promises instead). - Source:
Returns:
- Type
- Promise.<(NetworkResponse|NetworkResponse)>
-
setAuthenticationType()
Returns the Authorization object that provides authorization capabilities and access to user properties.
-
Returns the Authorization object that provides authorization capabilities and access to user properties.
Parameters:
Name Type Description type.
string For Basic Authentication, you would specify "basicAuth" to use the Basic Authentication security schema. For OAuth authentication, you would specify "oAuth" to use OAuth Authentication security schema. If you put any type other than those two, it will throw an Exception stating that the type of Authentication that you provided is not supported at this time. - Source:
Examples
<caption>Example usage of mobileBackend.setAuthenticationType()</caption>
var mobileBackend = mcs.mobileBackendManager.getMobileBackend('YOUR_BACKEND_NAME');
mobileBackend.setAuthenicationType("basicAuth"); //Basic Authorization schema
mobileBackend.setAuthenicationType("oAuth"); //OAuth Authorization schema
mobileBackend.setAuthenicationType("facebookAuth"); //Facebook Authorization schema
mobileBackend.setAuthenicationType("ssoAuth"); //Single Sign On Authorization schema
mobileBackend.setAuthenicationType("tokenAuth"); //Token Exchange Authorization schema
-
setAuthenticationTypeVariable(type)
Sets Authentication variable for MobileBackend.
-
Sets Authentication variable for MobileBackend.
Parameters:
Name Type Description type
- Deprecated:
-
- Will be deleted in next version. Use MobileBackend#setAuthenticationType instead.
- Source:
Type Definitions
-
appConfigSuccessCallback(statusCode, appConfig)
Callback invoked after downloading the application configuration.
-
Callback invoked after downloading the application configuration.
Parameters:
Name Type Description statusCode
Number Any HTTP status code returned from the server, if available. appConfig
Object The downloaded application configuration object. - Deprecated:
-
- Use promises instead
- Source:
-
errorCallback(statusCode, message)
Callback invoked on an error while downloading the application configuration.
-
Callback invoked on an error while downloading the application configuration.
Parameters:
Name Type Description statusCode
Number Any HTTP status code returned from the server, if available. message
String The HTTP payload from the server, if available, or an error message. - Deprecated:
-
- Use promises instead
- Source: