Socialid.login.getConnectionStatus
From Social ID Developers
(Difference between revisions)
(Created page with "== Description == API to get basic information about the current login session. == Usage == socialid.login.getConnectionStatus(handler) == Parameters == {| ! align="lef...") |
(→Description) |
||
Line 2: | Line 2: | ||
API to get basic information about the current login session. | 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 User Guide|Single Sign On]] use case. | ||
== Usage == | == Usage == |
Latest revision as of 15:24, 25 October 2016
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" }