Exemplo n.º 1
0
        public static void Init(RouteBuilder routeBuilder)
        {
            var RP = new Microsoft_RP(
                Config.config.rpPrincipal,
                Config.config.AppRegistration.Microsoft.appId,
                Config.config.agentRootUrl + "callback/Microsoft",
                Config.config.AppRegistration.Microsoft.appSecret,
                "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
                "https://login.microsoftonline.com/common/oauth2/v2.0/token",
                Config.config.stateSecretKey);

            routeBuilder.MapRoute("login/Microsoft", RP.Login_StartAsync);
            routeBuilder.MapRoute("callback/Microsoft", RP.AuthorizationCodeFlow_Login_CallbackAsync);
        }
        new public static void Init(RouteBuilder routeBuilder)
        {
            var RP = new Microsoft_RP(
                Config.config.rpPrincipal,
                Config.config.AppRegistration.MicrosoftAzureAD.appId,
                Config.config.agentRootUrl + "callback/MicrosoftAzureAD",
                Config.config.AppRegistration.MicrosoftAzureAD.appSecret,
                "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/authorize",
                "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token",
                //"https://testingsts.azurewebsites.net/oauth2/authorize",
                //"https://testingsts.azurewebsites.net/oauth2/token",
                Config.config.stateSecretKey);

            routeBuilder.MapRoute("login/MicrosoftAzureAD", RP.Login_StartAsync);
            routeBuilder.MapRoute("callback/MicrosoftAzureAD", RP.AuthorizationCodeFlow_Login_CallbackAsync);
        }