Skip to content
This repository has been archived by the owner on Dec 27, 2018. It is now read-only.

v0.2.0

Compare
Choose a tag to compare
@emmenko emmenko released this 29 Nov 13:23
· 89 commits to master since this release

Improvements:

  • simplified internal logic
  • extended options for OAuth and Rest
var oa = new OAuth2({
  config: {
    client_id: "",
    client_secret: "",
    project_key: ""
  },
  host: "auth.sphere.io", // optional
  accessTokenUrl: "/oauth/token" // optional,
  timeout: 20000, // optional
  rejectUnauthorized: true // optional
});
var rest = new Rest({
  config: {
    client_id: "",
    client_secret: "",
    project_key: ""
  },
  host: "api.sphere.io", // optional
  access_token: "", // optional (if not provided it will automatically retrieve an access_token)
  timeout: 20000, // optional
  rejectUnauthorized: true, // optional
  oauth_host: "auth.sphere.io" // optional (used when retrieving the access_token internally) 
});