Socket
Socket
Sign inDemoInstall

caccl-authorizer

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.8 to 1.0.9

test/selenium/valid-onlogin/config.js

4

package.json
{
"name": "caccl-authorizer",
"version": "1.0.8",
"version": "1.0.9",
"description": "Acquires Canvas tokens through via OAuth, stores refresh tokens, and refreshes access tokens when they expire.",

@@ -34,3 +34,3 @@ "main": "index.js",

"caccl-canvas-partial-simulator": "^1.0.9",
"dce-selenium": "^1.0.14",
"dce-selenium": "^1.0.16",
"eslint": "^5.13.0",

@@ -37,0 +37,0 @@ "eslint-config-airbnb": "^17.1.0",

@@ -13,8 +13,8 @@ const API = require('caccl-api');

nonceValid, // function that checks if a nonce is valid
getTimeSinceOnLogin,
getOnLoginTimestamp,
} = config;
app.get('/onlogininlast10s', (req, res) => {
app.get('/timesinceonlogin', (req, res) => {
return res.json({
elapsed: getTimeSinceOnLogin(),
timestamp: getOnLoginTimestamp(),
});

@@ -131,5 +131,2 @@ });

app.get('/expirenow', (req, res) => {
// Remove access token:
req.session.accessToken = null;
// Set as expired (expiration is now):

@@ -144,2 +141,9 @@ req.session.accessTokenExpiry = new Date().getTime();

// Check how long till token expires
app.get('/tokentimeleft', (req, res) => {
return res.json({
ms: req.session.accessTokenExpiry - new Date().getTime(),
});
});
// POST Launch requests

@@ -146,0 +150,0 @@ app.post(launchPath, (req, res) => {

@@ -260,4 +260,4 @@ const initCACCL = require('caccl/script');

};
const getTimeSinceOnLogin = () => {
return new Date().getTime() - lastOnLoginCall;
const getOnLoginTimestamp = () => {
return lastOnLoginCall;
};

@@ -304,3 +304,3 @@

nonceValid,
getTimeSinceOnLogin,
getOnLoginTimestamp,
});

@@ -307,0 +307,0 @@

@@ -12,2 +12,7 @@ const fs = require('fs');

/*------------------------------------------------------------------------*/
const startTime = new Date();
const replaceAll = (str, search, replacement) => {
return str.replace(new RegExp(search, 'g'), replacement);
};
const timestamp = `${startTime.toLocaleDateString()} ${replaceAll(startTime.toLocaleTimeString(), ':', '-')}`;

@@ -30,2 +35,3 @@ const runTests = async (folderName) => {

subfolder: folderName,
snapshotTitle: timestamp + '/' + folderName,
});

@@ -32,0 +38,0 @@ };

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc