Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caccl-api

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caccl-api - npm Package Compare versions

Comparing version 1.0.41 to 1.0.42

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## [1.0.42] - 09/28/19
Added support for authenticity tokens (for requests sent directly from Canvas pages)
## [1.0.39] - 09/27/19

@@ -7,0 +11,0 @@

@@ -63,2 +63,4 @@ /**

* to the response object
* @param {string} [config.authenticityToken] - An authenticity token
* to add to all requests no matter what (cannot be overridden)
*/

@@ -93,2 +95,3 @@ constructor(oldConfig = {}, Subclass) {

api: config.api,
authenticityToken: config.authenticityToken,
defaults: {

@@ -95,0 +98,0 @@ accessToken: config.accessToken,

@@ -29,2 +29,4 @@ const parseLinkHeader = require('parse-link-header');

* function that sends https requests (we recommend not including this)
* @param {string} [authenticityToken] - An authenticity token
* to add to all requests no matter what (cannot be overridden)
* @param {string}

@@ -44,2 +46,3 @@ */

uncache,
authenticityToken,
} = config;

@@ -93,2 +96,3 @@

accessToken,
authenticityToken,
});

@@ -95,0 +99,0 @@

@@ -52,2 +52,4 @@ /**

* @param {string} [accessToken] - the Canvas access token to add to params
* @param {string} [authenticityToken] - An authenticity token
* to add to all requests no matter what (cannot be overridden)
* @param {object} [params={}] - the original https parameters of the request

@@ -67,2 +69,7 @@ * @return {object} pre-processed request parameters

// Add authenticity token
if (config.authenticityToken) {
newParams.authenticity_token = config.authenticityToken;
}
// Set up number of entries per page

@@ -69,0 +76,0 @@ if (config.method === 'GET' && !newParams.per_page) {

@@ -30,2 +30,4 @@ /**

* the EndpointCategory we're adding an endpoint to is an ancestor of
* @param {string} [authenticityToken] - An authenticity token
* to add to all requests no matter what (cannot be overridden)
* @param {string} [defaults.accessToken] - a default access token to apply to

@@ -51,2 +53,3 @@ * all requests

requiredParams,
authenticityToken,
} = config;

@@ -90,2 +93,3 @@ const defaults = (config.defaults || {});

canvasHost,
authenticityToken,
accessToken: (

@@ -92,0 +96,0 @@ options.accessToken

@@ -37,3 +37,5 @@ /**

* including numPerPage option
* @param {string} [config.authenticityToken] - An authenticity token
* to add to all requests no matter what (cannot be overridden)
*/
module.exports = API;

2

package.json
{
"name": "caccl-api",
"version": "1.0.41",
"version": "1.0.42",
"description": "A class that defines a set of smart Canvas endpoints that actually behave how you'd expect them to.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc