Example #1
0
        /// <summary>
        /// Submit the ticket query to KMOD.
        /// </summary>
        private void SubmitKmodTicketQuery()
        {
            WmLoginTicketQuery ticketQuery = new WmLoginTicketQuery();

            m_kmodQuery = ticketQuery;
            KwmCfg cfg = new KwmCfg();

            UpdateRegistryObject(cfg);
            ticketQuery.Submit(Wm.KmodBroker, cfg, OnKmodTicketResult);
        }
Example #2
0
        public override void Start()
        {
            try
            {
                // Make sure we can login on the KPS.
                if (!KwmCfg.Cur.CanLoginOnKps())
                {
                    throw new EAnpExInvalidKpsConfig();
                }

                // Get a ticket.
                m_step = OpStep.TicketReply;
                WmLoginTicketQuery ticketQuery = new WmLoginTicketQuery();
                m_kmodQuery = ticketQuery;
                ticketQuery.Submit(Wm.KmodBroker, KwmCfg.Cur, OnKmodTicketResult);
            }

            catch (Exception ex)
            {
                HandleFailure(ex);
            }
        }
Example #3
0
        public override void Start()
        {
            try
            {
                // Make sure we can login on the KPS.
                if (!KwmCfg.Cur.CanLoginOnKps()) throw new EAnpExInvalidKpsConfig();

                // Get a ticket.
                m_step = OpStep.TicketReply;
                WmLoginTicketQuery ticketQuery = new WmLoginTicketQuery();
                m_kmodQuery = ticketQuery;
                ticketQuery.Submit(Wm.KmodBroker, KwmCfg.Cur, OnKmodTicketResult);
            }

            catch (Exception ex)
            {
                HandleFailure(ex);
            }
        }
Example #4
0
 /// <summary>
 /// Obtain a login ticket and login with it.
 /// </summary>
 private void HandleTicketLoginStep()
 {
     m_currentStep = KwsLoginStep.Ticket;
     m_ticketQuery = new WmLoginTicketQuery();
     m_ticketQuery.Submit(Wm.KmodBroker, KwmCfg.Cur, HandleTicketLoginResult);
 }
Example #5
0
        /// <summary>
        /// Called when the login query results are available.
        /// </summary>
        private void OnLoginResult(KmodQuery query)
        {
            Logging.Log("OnLoginResult() called.");
            ClearKmodQuery();
            K3p.kmo_server_info_ack ack = query.OutMsg as K3p.kmo_server_info_ack;

            if (ack != null)
            {
                creds.Token = ack.Token;
                WmLoginTicketQuery ticketQuery = new WmLoginTicketQuery();
                SaveCredentials();
                m_query = ticketQuery;
                ticketQuery.Submit(m_broker, WmWinRegistry.Spawn(), OnTicketResult);
            }

            else
            {
                K3p.kmo_server_info_nack nack = query.OutMsg as K3p.kmo_server_info_nack;

                if (nack != null)
                {
                    if (nack.Error.StartsWith("cannot resolve ")) creds.SetServerError(nack.Error);
                    else creds.SetCredError(nack.Error);
                }

                else
                {
                    creds.SetServerError(query.OutDesc);
                }

                this.Enabled = true;
            }
        }
Example #6
0
 /// <summary>
 /// Obtain a login ticket and login with it.
 /// </summary>
 private void HandleTicketLoginStep(WmWinRegistry registry)
 {
     m_currentStep = KwsLoginStep.Ticket;
     m_ticketQuery = new WmLoginTicketQuery();
     m_ticketQuery.Submit(m_wm.KmodBroker, registry, HandleTicketLoginResult);
 }
Example #7
0
 /// <summary>
 /// Obtain a login ticket and login with it.
 /// </summary>
 private void HandleTicketLoginStep()
 {
     m_currentStep = KwsLoginStep.Ticket;
     m_ticketQuery = new WmLoginTicketQuery();
     m_ticketQuery.Submit(Wm.KmodBroker, KwmCfg.Cur, HandleTicketLoginResult);
 }
Example #8
0
 /// <summary>
 /// Post a login ticket query.
 /// </summary>
 public void PostLoginTicketQuery(WmWinRegistry registry, WmLoginTicketQueryDelegate callback)
 {
     Logging.Log(1, "PostLoginTicketQuery()");
     WmLoginTicketQuery loginQuery = new WmLoginTicketQuery();
     loginQuery.Submit(Op.Wm.KmodBroker, registry, callback);
     Op.m_kmodQuery = loginQuery;
 }
Example #9
0
 /// <summary>
 /// Submit the ticket query to KMOD.
 /// </summary>
 private void SubmitKmodTicketQuery()
 {
     WmLoginTicketQuery ticketQuery = new WmLoginTicketQuery();
     m_kmodQuery = ticketQuery;
     KwmCfg cfg = new KwmCfg();
     UpdateRegistryObject(cfg);
     ticketQuery.Submit(Wm.KmodBroker, cfg, OnKmodTicketResult);
 }