public void DecodeTokenToPerson()
        {
            var config    = GetFromAppConfig();
            var connector = MyInfoConnector.Create(config);

            var data = connector.DecodeTokenToPerson("eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00iLCJraWQiOiJkZXYud2Vic2l0ZS5pbmRlcGVuZGVudHJlc2VydmUubmV0In0.YX8fL1-9bPC2jSf2C-VZOgURh-A4vxDohxUIK8ZapMQ1UbNqf6mPrtnsIARPAX9q8PkH77tKwUtzr9T1sFkFk6Hw-qr3gRJIAkzuBVGrtPmjukHCDINDLlaJ_R3qtWKuUl-S1iSJO5nItDeUKr9M2HwBO3hhervY0jVeu3dFD3LpUE9yRiBmn7ja4Hy08offSs7blCHKL3qJssU9oa-PApGHp-eRhMmfkEMf1Sl8oXXXpVdSHH3ghwZ-g3X7-Zckj__KPJJO2ZRy5CJ6hlp4SeFuz0BUD1oiInUIUaQ83KYuGKTLW09ThJcg8790vNaifBNKC_GuGKMQ7CCtRn_WYA.2zRyUjiNkBnTlPoX.MBVgcW5dTE8ZP7XoIk1N-wdVOpy_yB10yfqpxUZwdaaObH7XUpR7ccEorTCKujsa3__0MoI7GQB56-g9Zc5XHSlKI8BvOfsNck8d1_g_kCNihYlhn4Z1vxqJMmK8LuZWONxT1HHdm1rwQqAAjSLht5cCHPLtstBYzVpRDDobLYnU0zmeKlVCUjaUTqH2-_ZZHDARhRhaeBiSBkDtvN9OKjU7waMC3CvyKix1RVw4wi1eH2fhD6q_aAgYXA3DYQP7S4v9dbUdOdqMe46weFC3gQ78mJu-KdWig8ZcqFXZE01FKUtENab8Fri1uSad1RTGrleJVBIlBxr8yk8E8UhL2Na0tAkpWLe8Ps6-ig20bOcn5be4wckqbOW1nLefJ-SkcaQW9Z-d5xWJnm1_EJbnHhl1kqF_M6_ThYtGn2IBYACmFrGgjjTD4CkDYGD6bmllrrronmsN1YpdCbvEigyJ1bhj2z80hne0tZGTEqGJ9AM_RsPEYBAIh94doeCTnu82u9pHlFIwE9O1hK2S41AA-V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_5V4FwC4YKouXatDbgUSPYxMCPz0vAIWdhmWKqMEKU5egwwG7S1zc7E_DPQVx_DDrERiQeHIKB9l1g6mSggoPhDgQb4XtJTsvFe__WUgNpSNThgs01icrpyxOyps9puZgAxxx-HwxxQ6VOCjHR-uWwHuUSVSdm9UDl6mRe_SefoWiyVBprIR7FV5f8sn8Id9D0jmvyTWhw9uHlq70gVV3Q2nqPXfLrs5Lv6Vhm5sz7hMl9Tvr8I0SURIAd20yODueWwuNuDmQjuDC7sZcs7rM31K0HeNwf5OQlh-T0lZRlehDK2ZaD4t-HAl49tSBflrOTis-XyW59sltzWD5on4fhLH8rIET5D7QwQ1CwG7W1QICS7dqt3q288VGt4hPkW4TMyCT5CHhUf1OhxZdGtJ55M7Mx2agN1MDbgI2DwTLypM7j0seOUjT3vwgId2wma9m16yKZKilw9xIuhCX23lwP_svIjikizVkcPAbF4hH2capVeV4qLJDBNTexgkyjiU0ygog33lzLG1Fd1dFOAy2qG3hvkWcAvF5e1rKMRvmmbtOU46sNSUIDr8hBbwth2vNtwNUK5twJBAdlVF0_ZvQg5R1QFkAWMibbcCBqF6xj28WXIbqm8Fr_jTAJ3c5ZDWDrrOGxAhvMTD2qBp3zRlWXh5kJ0CAq4wfBlvkgdYnZ1rIbFFZHBKc.TEOV_0dE8FtFNX8HtpRbRQ");

            Assert.IsNotNull(data);
        }
        public void Run()
        {
            var config = GetConfig();

            var isValidConfig = config.IsValid();

            if (!isValidConfig.isValid)
            {
                Log.Warn("Config warnings:\r\n" + string.Join("\r\n", isValidConfig.messages));
            }

            var connector = MyInfoConnector.Create(config);

            var redirectUri = GetRedirectUri();
            var state       = "a-fixed-state-value";

            Log.Info($"Generating an authorise URL that will redirect back to {redirectUri}");

            var authoriseUrl = connector.GetAuthoriseUrl(redirectUri, state);

            Log.Info($"Opening URL to\r\n\r\n{authoriseUrl}\r\n");

            OpenBrowser(authoriseUrl);

            Log.Info($"After authorising you will get redirected to a localhost:3001 url with a code in the query string");
            Log.Info($"Paste in the query string now");

            var code = Console.ReadLine();

            Log.Info($"We read code='{code}'. Now getting the person json");

            var personJson    = connector.GetPersonJson(redirectUri, code);
            var formattedJson = FormatJson(personJson);

            Log.Info($"Person json is\r\n{formattedJson}");
        }