GetIdentityStatus
Retrieves identity status for given identity type for this profile.
Service | Operation |
---|---|
identity | GET_IDENTITY_STATUS |
tip
The field loginAuthType
will only have a non-null value if it differs from the authenticationType
.
Method Parameters
Parameter | Description |
---|---|
authenticationType | Type of authentication. |
externalAuthName | The name of the external authentication mechanism (optional, used for custom authentication types) |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string authenticationType = "Facebook";
string externalAuthName = "";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.IdentityService.GetIdentityStatus(authenticationType, externalAuthName, successCallback, failureCallback);
const char *authenticationType = "Facebook";
const char *externalAuthName = "";
_bc.getIdentityService().getIdentityStatus(authenticationType, externalAuthName, this);
NSString *authenticationType = @"Facebook";
NSString *externalAuthName = @"";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc identityService] getIdentityStatus:
authenticationType:authenticationType
externalAuthName:externalAuthName
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil]
String authenticationType = "Facebook";
String externalAuthName = "";
this; // implements IServerCallback
_bc.getIdentityService.getIdentityStatus(authenticationType, externalAuthName, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var authenticationType = "Facebook";
var externalAuthName = "";
_bc.identity.getIdentityStatus(authenticationType, externalAuthName, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var authenticationType = "Facebook";
var externalAuthName = "";
ServerResponse result = await _bc.identityService.getIdentityStatus(authenticationType:authenticationType, externalAuthName:externalAuthName);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var authenticationType = "Facebook";
var externalAuthName = "";
var identityProxy = bridge.getIdentityServiceProxy();
var postResult = identityProxy.getIdentityStatus(authenticationType, externalAuthName);
{
"service":"identity",
"operation":"GET_IDENTITY_STATUS",
"data":{
"authenticationType":"Facebook",
"externalAuthName":""
}
}
JSON Response
{
"data": {
"identities": {
"Facebook": {
"tokenExpired": true,
"externalId": "111234914143270",
"loginAuthType": "FacebookLimited"
}
}
},
"status": 200
}