private string GenerateLoginUrl(bool useDogfood)
        {
            IAppConfig app = /*useDogfood ? new DogfoodAppConfig() :*/ new ProductionAppConfig();

            var baseUrl = app.AuthorizationServiceUri;
            OAuth2.QueryStringBuilder builder = new OAuth2.QueryStringBuilder();
            builder.Add("client_id", app.ClientId);
            builder.Add("response_type", "code+id_token", false);
            builder.Add("scope", "openid");
            builder.Add("redirect_uri", app.RedirectUri);
            builder.Add("prompt", "admin_consent");
            builder.Add("nonce", Guid.NewGuid().ToString());
            builder.Add("response_mode", "form_post");

            return baseUrl + builder.ToString();
        }
Esempio n. 2
0
        private string GenerateLoginUrl(bool useDogfood)
        {
            IAppConfig app = /*useDogfood ? new DogfoodAppConfig() :*/ new ProductionAppConfig();

            var baseUrl = app.AuthorizationServiceUri;

            OAuth2.QueryStringBuilder builder = new OAuth2.QueryStringBuilder();
            builder.Add("client_id", app.ClientId);
            builder.Add("response_type", "code+id_token", false);
            builder.Add("scope", "openid");
            builder.Add("redirect_uri", app.RedirectUri);
            builder.Add("prompt", "admin_consent");
            builder.Add("nonce", Guid.NewGuid().ToString());
            builder.Add("response_mode", "form_post");

            return(baseUrl + builder.ToString());
        }