This may be for Stack Overflow, but does anyone have any good tutorials or documentation for how to connect Ember Data with OAuth 1.0? Been spending days on this issue and have made little headway.
Here’s some CoffeeScript to show more of what I have come up with thus far. I have a route called “customers.” I am getting this error: GET http://my-site.local/api/v1/customers 404 (Not Found)
App.ApplicationAdapter = DS.RESTAdapter.extend
namespace: 'api/v1'
headers:
"Authorization": 'OAuth
oauth_consumer_key="ck_a4b16f6004b6ba89d757ec4bc265a84d",
oauth_nonce="'+oauthNonce+'",
oauth_signature="'+encodedSignature+'",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="'+oauthTimestamp+'"'
App.Router.map ->
@resource 'my-app', ->
@resource 'customers'
App.Customers = DS.Model.extend()
App.CustomersRoute = Ember.Route.extend
model: (params) ->
@store.find('customers')
EDIT: More debugging info from the Ember Inspector contains an error message from the API that I am attempting to connect to.
responseText: "{"errors":[{"code":"MY_API_authentication_error","message":"oauth_consumer_key parameter is missing"}]}"