Add JWT to Webform Remote Post handler

Hi,

I'm using the awesome Webform module in a Drupal 8 website.

My users authenticate through Keycloak (OpenID connect module and Keycloak module).

I would like to post the results of a webform to a server of mine that is an oAuth2 Resource Server, using the same Keycloak/realm/client as Drupal.
For this to work, the JWT of the current user must be added in the Authorization header as the Bearer token.

How do you programmatically get the main menu links that are accessible to the current user

I need to get the main menu into a multidimensional array format. I know you can get the 'main' menu like this:

$parameters = new MenuTreeParameters();

$tree = \Drupal::menuTree()->load('main', $parameters);

But this gives me all links in the menu. I want the restricted version of the menu that has access restrictions. Any ideas?

add multiple contents from an excel file

I am new to Drupal 8.   My client needs to add multiple contents  which read data from an excel file.   I know that Drupal 7 allows to add nodes though outside application with ODBC connection to process the content tables of mysql database directly.  I would like ask that the Drupal 8 in Acquia cloud still allows to do similar way? anyone may share ideas? very appreciated.  Thanks!

How to export content type from Drupal 7 to Drupal 8

Hi friends

i'm building a new site on drupal 8, but now all my content type is on drupal 7, 

so the question is, how can i export all my content type and its content from drupal 7 and import on drupal 8?

i was thinkig to creare a xml file and read that file and save my content, but i dont know if there is another way to do that.

Could you please help me?

Regards

When adding custom twig template to form it gives error

When I add custom twig template for my custom form it gives following error

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName()

My form buildForm is like this

Experimenting with a REST API

The CLI one-liner below uses curl to query a RESTful service:

curl -X POST -H "Content-Type: application/json" "https://graphhopper.com/api/1/route?key=[API KEY]" -d '{"elevation":false,"points":[[-0.087891,51.534377],[-0.090637,51.467697]],"vehicle":"car"}'

I've tested it, and it works as expected (if you supply a valid GraphHopper API KEY).

Is there a quick and easy way to do the same thing in the Drupal 8 GUI?

I know how to do it the hard way: Write a custom module to make the same POST-request.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x