Socialid.login.getConnectionStatus

From Social ID Developers
Jump to: navigation, search

Contents

Description

API to get basic information about the current login session.

This API can be used to retrieve the current connection_id when implementing Single Sign On use case.

Usage

 socialid.login.getConnectionStatus(handler)

Parameters

handler optional callback function to handle the API response.

API Response

data Javascript object containing data from the connection (see description below).
status The API response status. Can be success, if there is a current login session and its data was successfully retrieved, or not_found, if there is no current login session.

Response Data

The data object properties are:

connection_id connection_id.

Example

Get basic information about the current login session:

 socialid.login.init(1);
 var handler = function(response) {
    if (response.status == "success") {
       alert("Connection id: " + response.data.connection_id);
    } else {
       alert("Could not get info from the current login session.");
    }
 }
 socialid.login.getConnectionStatus(handler);

Example of "data" object:

 data = {
   connection_id: "1234567890"
 }
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox