SmartSwitchAuthenticateOculus
Smart Switch Authenticate will logout of the current profile, and switch to the new authentication type. In event the current session was previously an anonymous account, the smart switch will delete that profile. Use this function to keep a clean designflow from anonymous to signed profiles.
Authenticate the user with brainCloud using their Oculus Credentials.
Method Parameters
Parameter | Description |
---|---|
userId | The Oculus ID of the user |
nonce | The returned nonce from the Oculus Platform SDK |
forceCreate | Should a new profile be created for this user if the account does not exist? |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Cloud Code
- Raw
string userId = "userId";
string nonce = "nonce";
bool forceCreate = true;
_bc.SmartSwitchAuthenticateOculus(
userId, nonce, forceCreate, SuccessCallback, FailureCallback);
const char* userId = "userId";
const char* nonce = "nonce";
bool forceCreate = true;
_bc->smartSwitchAuthenticateOculus(
userId,
nonce,
forceCreate,
this);
// N/A
String userId = "userId";
String nonce = "nonce";
boolean forceCreate = true;
this; // implements IServerCallback
_bc.smartSwitchAuthenticateOculus(userId, nonce, forceCreate, 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()));
}
// N/A
// N/A
// N/A
JSON Response
// N/A