/// <summary>
        /// Authenticate process with authentication code, and browser is trigged by SDK users.
        /// </summary>
        /// <param name="authCode">The authentication code</param>
        /// <param name="completionHandler">The completion event handler.</param>
        /// <remarks>Since: 0.1.0</remarks>
        public void Authorize(string authCode, Action <WebexApiEventArgs> completionHandler = null)
        {
            if (null == authCode)
            {
                SdkLogger.Instance.Error("auth code is null.");
                completionHandler?.Invoke(new WebexApiEventArgs(false, null));
                return;
            }
            AuthorizeAction = completionHandler;

            if (!isRegisteredToCore)
            {
                RegisterToCore();
            }
            m_core.login(authCode, "");
        }
Example #2
0
        /// <summary>
        /// Authenticate process with authentication code, and browser is trigged by SDK users.
        /// </summary>
        /// <param name="authCode">The authentication code</param>
        /// <param name="completionHandler">The completion event handler.</param>
        /// <remarks>Since: 0.1.0</remarks>
        public void Authorize(string authCode, Action <SparkApiEventArgs> completionHandler = null)
        {
            if (null == authCode)
            {
                SDKLogger.Instance.Error("auth code is null.");
                if (completionHandler != null)
                {
                    completionHandler(new SparkApiEventArgs(false, null));
                }
                return;
            }
            AuthorizeAction = completionHandler;

            if (!isRegisteredToCore)
            {
                RegisterToCore();
            }
            m_core.login(authCode, "");
        }