Just curious, I have a few custom routes in my D8 module that return Json data that only work for logged in users. The endpoint has to combine drupal data with data from an external source so just using drupal's rest api and a view wouldn't work.
Is there any way to piggyback on the jDrupal object to have it make an authenticated request to that custom endpoint?
@anakinjay I haven't tried it yet, but it's definitely possible. Essentially just copy one of jDrupal's .js implementations of a resource, and change it to use your resource.
Just curious, I have a few custom routes in my D8 module that return Json data that only work for logged in users. The endpoint has to combine drupal data with data from an external source so just using drupal's rest api and a view wouldn't work.
Is there any way to piggyback on the jDrupal object to have it make an authenticated request to that custom endpoint?