Hello.
I've created a user for App42 and I want the user to be authenticated, the below code does work but only when the password or username field is empty, otherwise even if the password is wrong, it doesn't throw an exception. what is the problem of it? I want it to throw an exception when username and/or password is wrong,too.
using UnityEngine;
using System.Collections;
using com.shephertz.app42.paas.sdk.csharp;
using com.shephertz.app42.paas.sdk.csharp.user;
using System;
public class LVL0 : MonoBehaviour
{
void DoThis()
{
try
{
App42API.Initialize(MyapiKey, MysecretKey);
UserService userS = App42API.BuildUserService();
userS.Authenticate("user", "pass", new UnityCallBack());
}
catch
{
print("Error");
}
}
}
public class UnityCallBack : App42CallBack
{
public void OnSuccess(object response)
{
User user = (User)response;
}
public void OnException(Exception e)
{
App42Log.Console("Exception : " + e);
}
}