Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     try
     {
         ConfigurationManagerHelper.SetManager(new DummyManager());
         B2CGlobalConfiguration.AadPolicy = "B2C_1A_SignInWithADFSIdp";
         B2CGlobalConfiguration.AadTenant = "dnvglb2ctest.onmicrosoft.com";
         B2CGlobalConfiguration.Audience  = "aa307cec-db8a-4224-8d5f-e864f16b1ad0";
         IdentityModelEventSource.ShowPII = true;
         //B2CGlobalConfiguration.AudienceV1 = "https://dnvglb2ctest.onmicrosoft.com/af7f55bc-5f35-44a7-a18a-c62ef80bdd5d";
         B2CGlobalConfiguration.AudienceV1    = "https://dnvglb2ctest.onmicrosoft.com/efb3e529-2f80-458b-aedf-7f4c8c794b45";
         B2CGlobalConfiguration.ValidIssuer   = "https://login.microsoftonline.com/ed815121-cdfa-4097-b524-e2b23cd36eb6/v2.0";
         B2CGlobalConfiguration.ValidIssuerV1 = "https://sts.windows.net/ed815121-cdfa-4097-b524-e2b23cd36eb6/";
         Console.WriteLine("Validating bearer token");
         TokenValidator.SetLogger(new ConsoleLogger());
         TokenValidator.Validate(string.Join("", args));
     }
     catch (Exception ex)
     {
         Console.WriteLine("Failed");
     }
     Console.ReadKey();
 }