aboutsummaryrefslogtreecommitdiff
path: root/node_modules/passport-strategy/lib
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-07-21 06:24:24 +0000
committerHumairAK <humair88@hotmail.com>2016-07-21 06:24:24 +0000
commit2549ee68e435b77e7e07d3ea95363268cbfe9164 (patch)
tree8f48f6447a4377f1bc15ae7d73dbab3337044720 /node_modules/passport-strategy/lib
parentd694c1a73f77def42c17b58027f046bf9e1af809 (diff)
Added other dependencies for authentication, made minor adjustments to index.js, added templating for exams, will remove dependencie modules later, keep for now
Diffstat (limited to 'node_modules/passport-strategy/lib')
-rw-r--r--node_modules/passport-strategy/lib/index.js15
-rw-r--r--node_modules/passport-strategy/lib/strategy.js28
2 files changed, 43 insertions, 0 deletions
diff --git a/node_modules/passport-strategy/lib/index.js b/node_modules/passport-strategy/lib/index.js
new file mode 100644
index 0000000..a6fdfa7
--- /dev/null
+++ b/node_modules/passport-strategy/lib/index.js
@@ -0,0 +1,15 @@
+/**
+ * Module dependencies.
+ */
+var Strategy = require('./strategy');
+
+
+/**
+ * Expose `Strategy` directly from package.
+ */
+exports = module.exports = Strategy;
+
+/**
+ * Export constructors.
+ */
+exports.Strategy = Strategy;
diff --git a/node_modules/passport-strategy/lib/strategy.js b/node_modules/passport-strategy/lib/strategy.js
new file mode 100644
index 0000000..5a7eb28
--- /dev/null
+++ b/node_modules/passport-strategy/lib/strategy.js
@@ -0,0 +1,28 @@
+/**
+ * Creates an instance of `Strategy`.
+ *
+ * @constructor
+ * @api public
+ */
+function Strategy() {
+}
+
+/**
+ * Authenticate request.
+ *
+ * This function must be overridden by subclasses. In abstract form, it always
+ * throws an exception.
+ *
+ * @param {Object} req The request to authenticate.
+ * @param {Object} [options] Strategy-specific options.
+ * @api public
+ */
+Strategy.prototype.authenticate = function(req, options) {
+ throw new Error('Strategy#authenticate must be overridden by subclass');
+};
+
+
+/**
+ * Expose `Strategy`.
+ */
+module.exports = Strategy;