Esempio n. 1
0
        static void Main(string[] args)
        {
            IEVEAuthGateway AuthGateway = null;

            Console.WriteLine("The app is running...");

            Console.WriteLine("Calling the factory to produce an SSO Gateway:");

            try
            {
                // Running the tool should launch a browser (tab) and run straight to the OAuth page at CCP
                AuthGateway = EVEAuthFactory.GetEVEAuthGateway();
            }
            catch (Exception ex)
            {
                Console.WriteLine("There was a problem creating the Gateway...");
                Console.Write(ex.ToString());
            }

            Console.WriteLine("You should have been punched out!");

            // Subscribe to the SSOComplete event
            GlobalEvents.SSOComplete += SSOComplete;

            Console.ReadLine();
        }
Esempio n. 2
0
        private void bLoginSSO_Click(object sender, EventArgs e)
        {
            // We're trying to SSO with EVE. Call the gateway, subscribe to the success event and enjoy.
            IEVECharacterManager CharacterManager = EVECharacterManagerFactory.GetEVECharacterManager();

            GlobalEvents.SSOComplete += (object Sender, SSOCompleteEventArgs args) =>
            {
                CharacterManager.SetCharacterTokens(args);
            };

            IEVEAuthGateway AuthGateway = EVEAuthFactory.GetEVEAuthGateway();
        }