From 2549ee68e435b77e7e07d3ea95363268cbfe9164 Mon Sep 17 00:00:00 2001 From: HumairAK Date: Thu, 21 Jul 2016 02:24:24 -0400 Subject: Added other dependencies for authentication, made minor adjustments to index.js, added templating for exams, will remove dependencie modules later, keep for now --- node_modules/base64-url/LICENSE | 15 ++++++ node_modules/base64-url/README.md | 55 +++++++++++++++++++ node_modules/base64-url/index.js | 24 +++++++++ node_modules/base64-url/package.json | 101 +++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100644 node_modules/base64-url/LICENSE create mode 100644 node_modules/base64-url/README.md create mode 100644 node_modules/base64-url/index.js create mode 100644 node_modules/base64-url/package.json (limited to 'node_modules/base64-url') diff --git a/node_modules/base64-url/LICENSE b/node_modules/base64-url/LICENSE new file mode 100644 index 0000000..9549143 --- /dev/null +++ b/node_modules/base64-url/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2014, Joaquim José F. Serafim + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/base64-url/README.md b/node_modules/base64-url/README.md new file mode 100644 index 0000000..d9368c8 --- /dev/null +++ b/node_modules/base64-url/README.md @@ -0,0 +1,55 @@ +# base64-url + +Base64 encode, decode, escape and unescape for URL applications. + + + +[![Build Status](https://travis-ci.org/joaquimserafim/base64-url.png?branch=master)](https://travis-ci.org/joaquimserafim/base64-url) + + +## API + +```js +base64url.encode('Node.js is awesome.'); +// returns Tm9kZS5qcyBpcyBhd2Vzb21lLg + +base64url.decode('Tm9kZS5qcyBpcyBhd2Vzb21lLg'); +// returns Node.js is awesome. + +base64url.escape('This+is/goingto+escape=='); +// returns This-is_goingto-escape + +base64url.unescape('This-is_goingto-escape'); +// returns This+is/goingto+escape== +``` + + +## Development + +**this projet has been set up with a precommit that forces you to follow a code style, no jshint issues and 100% of code coverage before commit** + + +to run test +``` js +npm test +``` + +to run jshint +``` js +npm run jshint +``` + +to run code style +``` js +npm run code-style +``` + +to check code coverage +``` js +npm run check-coverage +``` + +to open the code coverage report +``` js +npm run coverage +``` diff --git a/node_modules/base64-url/index.js b/node_modules/base64-url/index.js new file mode 100644 index 0000000..34968ae --- /dev/null +++ b/node_modules/base64-url/index.js @@ -0,0 +1,24 @@ +'use strict'; + +var base64url = module.exports; + +base64url.unescape = function unescape (str) { + return (str + Array(5 - str.length % 4) + .join('=')) + .replace(/\-/g, '+') + .replace(/_/g, '/'); +}; + +base64url.escape = function escape (str) { + return str.replace(/\+/g, '-') + .replace(/\//g, '_') + .replace(/=/g, ''); +}; + +base64url.encode = function encode (str) { + return this.escape(new Buffer(str).toString('base64')); +}; + +base64url.decode = function decode (str) { + return new Buffer(this.unescape(str), 'base64').toString(); +}; diff --git a/node_modules/base64-url/package.json b/node_modules/base64-url/package.json new file mode 100644 index 0000000..82b8785 --- /dev/null +++ b/node_modules/base64-url/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + "base64-url@1.2.2", + "/home/humair/School/csc309/a4/solutions_repo/node_modules/uid-safe" + ] + ], + "_from": "base64-url@1.2.2", + "_id": "base64-url@1.2.2", + "_inCache": true, + "_installable": true, + "_location": "/base64-url", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/base64-url-1.2.2.tgz_1459642531916_0.0884270598180592" + }, + "_npmUser": { + "email": "joaquim.serafim@gmail.com", + "name": "quim" + }, + "_npmVersion": "2.15.0", + "_phantomChildren": {}, + "_requested": { + "name": "base64-url", + "raw": "base64-url@1.2.2", + "rawSpec": "1.2.2", + "scope": null, + "spec": "1.2.2", + "type": "version" + }, + "_requiredBy": [ + "/uid-safe" + ], + "_resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.2.tgz", + "_shasum": "90af26ef8b0b67bc801b05eccf943345649008b3", + "_shrinkwrap": null, + "_spec": "base64-url@1.2.2", + "_where": "/home/humair/School/csc309/a4/solutions_repo/node_modules/uid-safe", + "author": { + "name": "@joaquimserafim" + }, + "bugs": { + "url": "https://github.com/joaquimserafim/base64-url/issues" + }, + "dependencies": {}, + "description": "Base64 encode, decode, escape and unescape for URL applications", + "devDependencies": { + "istanbul": "^0.3.5", + "jscs": "^1.9.0", + "jshint": "^2.5.11", + "pre-commit": "0.0.9", + "tape": "^3.0.3", + "which": "^1.0.8" + }, + "directories": {}, + "dist": { + "shasum": "90af26ef8b0b67bc801b05eccf943345649008b3", + "tarball": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.2.tgz" + }, + "files": [ + "LICENSE", + "README.md", + "index.js" + ], + "gitHead": "7e5b7e351edbf67ed04e3475663d3a64e0c32035", + "homepage": "https://github.com/joaquimserafim/base64-url", + "keywords": [ + "base64", + "base64url" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "quim", + "email": "joaquim.serafim@gmail.com" + } + ], + "name": "base64-url", + "optionalDependencies": {}, + "pre-commit": [ + "check-coverage", + "code-style", + "jshint", + "test" + ], + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/joaquimserafim/base64-url.git" + }, + "scripts": { + "check-coverage": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100", + "code-style": "jscs -p google *.js", + "coverage": "open coverage/lcov-report/index.html", + "jshint": "jshint -c .jshintrc *.js", + "test": "istanbul cover tape test.js" + }, + "version": "1.2.2" +} -- cgit v1.2.3