//DavidHernández
Grab the code:
https://github.com/RoySegall/drupal-elm-starter
RESTful is a way to communicate between a provider (Drupal) and a consumer (JS application) using several fundamentals operations:
GET, POST, DELETE, PATCH/PUT
There are couple of ways to authenticate using the RESTful module but let’s talk about something a bit more “global” - access token.
Access token is a string contains odd characters and numbers which represent the user in the system. We will pass the access token in each request.
$http.get('http://localhost/drupal/api/login-token', {
headers: {
'Authorization': 'Basic ' + Base64.encode(username + ':' + password)
}
})
On the business side:
On the dev side: