コード例 #1
0
        static void Main(string[] args)
        {
            Console.Title = "ACS Configuration Tool";

            PrintStartupMessage();

            // Prompt for ACS data
            Console.WriteLine("Enter your service namespace (eg: foo)");
            string serviceNamespace = Console.ReadLine();

            Console.WriteLine("Enter your Management Service Identity Key (eg: A3THQ1Cgj56ZuZXjcWTAL266lftW2+9tJB7HLWXmNYY=)");
            string managementServiceIdentityKey = Console.ReadLine();

            // create helper
            ManagementServiceHelper managementHelper = new ManagementServiceHelper(serviceNamespace, AcsHostUrl, AcsManagementServicesRelativeUrl, ManagementServiceIdentityName, managementServiceIdentityKey);

            // Step 1
            Console.WriteLine();
            Console.WriteLine("1 - Updating Service Identity Redirect Address ...");
            managementHelper.UpdateServiceIdentityRedirectAddress(ClientIdentity, RedirectUrlAfterEndUserConsent);
            Console.WriteLine("Done!");

            // Step 2
            Console.WriteLine();
            Console.WriteLine("2 - Updating RelyingParty rules");
            managementHelper.UpdateRelyingPartyRule(RelyingPartyApplicationName, IdentityProvider);
            Console.WriteLine("Done!");

            // Process completed
            Console.WriteLine();
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.Title = "ACS Configuration Tool";

            PrintStartupMessage();

            // Prompt for ACS data
            Console.WriteLine("Enter your service namespace (eg: foo)");
            string serviceNamespace = Console.ReadLine();

            Console.WriteLine("Enter your Management Service Identity Key (eg: A3THQ1Cgj56ZuZXjcWTAL266lftW2+9tJB7HLWXmNYY=)");
            string managementServiceIdentityKey = Console.ReadLine();

            // create helper
            ManagementServiceHelper managementHelper = new ManagementServiceHelper(serviceNamespace, AcsHostUrl, AcsManagementServicesRelativeUrl, ManagementServiceIdentityName, managementServiceIdentityKey);

            // Step 1
            Console.WriteLine();
            Console.WriteLine("1 - Updating Service Identity Redirect Address ...");
            managementHelper.UpdateServiceIdentityRedirectAddress(ClientIdentity, RedirectUrlAfterEndUserConsent);
            Console.WriteLine("Done!");

            // Step 2
            Console.WriteLine();
            Console.WriteLine("2 - Updating RelyingParty rules");
            managementHelper.UpdateRelyingPartyRule(RelyingPartyApplicationName, IdentityProvider);
            Console.WriteLine("Done!");

            // Process completed
            Console.WriteLine();
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }