Realtime Cloud Storage

authenticate

Gives an authentication token permission to access a set of operations and table data.

Sample

curl 'https://storage-backend-prd-useast1.realtime.co/authenticate' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "privateKey":"[YOUR_PVT_KEY]", "authenticationToken":"[YOUR_TOKEN]", "roles":["DeveloperRole"] }'

Parameters

String applicationKey

Public key of the application's license.

String privateKey

Private key of the application's license. For administration use only.

String authenticationToken

Identification of the user using the application.

String[] roles optional

A list of the names of the roles to be applied to the authentication token.

Policy policies optional

A set of rules to be applied only to the authentication token.

Number timeout

The duration, in seconds, after which the permissions for the authentication token expire.

AuthenticateResponse callback

Function called when the operation completes.

Response

AuthenticateResponse(data, error)

Response of the authenticate operation.

Boolean data

States the success of the operation.

Error error

The attribute that holds the results of the operation if an error occurred.