Module: loopback

Class: Application

Application

Manage client applications and organize their users.

Class Properties
Name Type Description
id String

Generated ID.

name String

Name; required.

description String

Text description

icon String

String Icon image URL.

owner String

User ID of the developer who registers the application.

email String

E-mail address

emailVerified Boolean

Whether the e-mail is verified.

url String

OAuth 2.0 application URL.

{String}[]

callbackUrls The OAuth 2.0 code/token callback URL.

status String

Status of the application; Either production, sandbox (default), or disabled.

created Date

Date Application object was created. Default: current date.

modified Date

Date Application object was modified. Default: current date.

pushSettings.apns Object

APNS configuration, see the options below and also https://github.com/argon/node-apn/blob/master/doc/apn.markdown

pushSettings.apns.production Boolean

Whether to use production Apple Push Notification Service (APNS) servers to send push notifications. If true, uses gateway.push.apple.com:2195 and feedback.push.apple.com:2196. If false, uses gateway.sandbox.push.apple.com:2195 and feedback.sandbox.push.apple.com:2196

pushSettings.apns.certData String

The certificate data loaded from the cert.pem file (APNS).

pushSettings.apns.keyData String

The key data loaded from the key.pem file (APNS).

pushSettings.apns.pushOptions.gateway String

(APNS).

pushSettings.apns.pushOptions.port Number

(APNS).

pushSettings.apns.feedbackOptions.gateway String

(APNS).

pushSettings.apns.feedbackOptions.port Number

(APNS).

pushSettings.apns.feedbackOptions.batchFeedback Boolean

(APNS).

pushSettings.apns.feedbackOptions.interval Number

(APNS).

pushSettings.gcm.serverApiKey: String

Google Cloud Messaging API key.

authenticationEnabled Boolean
anonymousAllowed Boolean
authenticationSchemes Array

List of authentication schemes (see below).

authenticationSchemes.scheme String

Scheme name. Supported values: local, facebook, google, twitter, linkedin, github.

authenticationSchemes.credential Object

Scheme-specific credentials.

Application.authenticate(appId, key, callback)

Authenticate the application id and key.

Arguments
Name Type Description
appId Any
key String
callback Function
Callback
Name Type Description
err Error
matched String

The matching key; one of: - clientKey

  • javaScriptKey
  • restApiKey
  • windowsKey
  • masterKey

Application.register(owner, name, options, callback)

Register a new application

Arguments
Name Type Description
owner String

Owner's user ID.

name String

Name of the application

options Object

Other options

callback Function

Callback function

application.resetKeys(callback)

Reset keys for the application instance

Arguments
Name Type Description
callback Function
Callback
Name Type Description
err Error

Application.resetKeys(appId, callback)

Reset keys for a given application by the appId

Arguments
Name Type Description
appId Any
callback Function
Callback
Name Type Description
err Error