Example #1
0
        public int SetIssueOTPCallback(Session.IssueOTPDelegate callback)
        {
            if (null == callback)
            {
                return(0);
            }

            int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message)
            {
                Log.Debug("[SessionCallback] IssueOTPCallback: " + message.ToString());

                Result result = message.GetResult();
                string otp    = message.GetString("otp");

                List <OTPAuthenticationHistory> otpAuthenticationHistoryList = null;
                IList historyList = message.GetList("otpAuthenticationHistoryList");
                if (historyList != null)
                {
                    otpAuthenticationHistoryList = new List <OTPAuthenticationHistory>();
                    foreach (IDictionary history in historyList)
                    {
                        string gameCode     = history.GetString("gameCode");
                        string playerId     = history.GetString("playerId");
                        string creationDate = history.GetString("creationDate");

                        otpAuthenticationHistoryList.Add(new OTPAuthenticationHistory(gameCode, playerId, creationDate));
                    }
                }

                if (null != callback)
                {
                    callback(result, otp, otpAuthenticationHistoryList);
                }
            });

            return(handlerNum);
        }
        public void IssueOTP(Session.IssueOTPDelegate callback)
        {
            int handlerNum = sessionCallback.SetIssueOTPCallback(callback);

            nmg_session_issueOTP(handlerNum);
        }
Example #3
0
 public void IssueOTP(Session.IssueOTPDelegate callback)
 {
 }
        public void IssueOTP(Session.IssueOTPDelegate callback)
        {
            int handlerNum = sessionCallback.SetIssueOTPCallback(callback);

            sessionAndroidClass.CallStatic("nmg_session_issueOTP", handlerNum);
        }