فهرست منبع

Initial commit.

Jared Hanson 3 سال پیش
کامیت
48083318e9
5فایلهای تغییر یافته به همراه115 افزوده شده و 0 حذف شده
  1. 9 0
      .gitignore
  2. 25 0
      Makefile
  3. 9 0
      lib/index.js
  4. 21 0
      lib/strategy.js
  5. 51 0
      package.json

+ 9 - 0
.gitignore

@@ -0,0 +1,9 @@
+docs/
+reports/
+
+# Mac OS X
+.DS_Store
+
+# Node.js
+node_modules
+npm-debug.log

+ 25 - 0
Makefile

@@ -0,0 +1,25 @@
+include node_modules/make-node/main.mk
+
+
+SOURCES = lib/*.js lib/**/*.js
+TESTS = test/*.test.js test/**/*.test.js
+
+LCOVFILE = ./reports/coverage/lcov.info
+
+MOCHAFLAGS = --require ./test/bootstrap/node
+
+
+view-docs:
+	open ./docs/index.html
+
+view-cov:
+	open ./reports/coverage/lcov-report/index.html
+
+clean: clean-docs clean-cov
+	-rm -r $(REPORTSDIR)
+
+clobber: clean
+	-rm -r node_modules
+
+
+.PHONY: clean clobber

+ 9 - 0
lib/index.js

@@ -0,0 +1,9 @@
+// Load modules.
+var Strategy = require('./strategy');
+
+
+// Expose Strategy.
+exports = module.exports = Strategy;
+
+// Exports.
+exports.Strategy = Strategy;

+ 21 - 0
lib/strategy.js

@@ -0,0 +1,21 @@
+var passport = require('passport-strategy')
+  , util = require('util')
+
+function Strategy(options, verify) {
+  options = options || {};
+  
+}
+
+/**
+ * Inherit from `passport.Strategy`.
+ */
+util.inherits(Strategy, passport.Strategy);
+
+Strategy.prototype.authenticate = function(req, options) {
+  console.log('ethereum authenticate...');
+};
+
+/**
+ * Expose `Strategy`.
+ */
+module.exports = Strategy;

+ 51 - 0
package.json

@@ -0,0 +1,51 @@
+{
+  "name": "passport-ethereum",
+  "version": "0.1.1",
+  "description": "Sign-In with Ethereum authentication strategy for Passport.",
+  "keywords": [
+    "passport",
+    "ethereum"
+  ],
+  "author": {
+    "name": "Jared Hanson",
+    "email": "jaredhanson@gmail.com",
+    "url": "https://www.jaredhanson.me/"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/jaredhanson/passport-ethereum.git"
+  },
+  "bugs": {
+    "url": "https://github.com/jaredhanson/passport-ethereum/issues"
+  },
+  "funding": {
+    "type": "github",
+    "url": "https://github.com/sponsors/jaredhanson"
+  },
+  "license": "MIT",
+  "licenses": [
+    {
+      "type": "MIT",
+      "url": "https://opensource.org/licenses/MIT"
+    }
+  ],
+  "main": "./lib",
+  "dependencies": {
+    "oauth": "0.9.x",
+    "passport-strategy": "1.x.x"
+  },
+  "devDependencies": {
+    "chai": "2.x.x",
+    "chai-passport-strategy": "3.x.x",
+    "make-node": "0.3.x",
+    "mocha": "2.x.x",
+    "proxyquire": "^1.7.10",
+    "sinon": "^1.17.6"
+  },
+  "engines": {
+    "node": ">= 0.6.0"
+  },
+  "scripts": {
+    "test": "mocha --require ./test/bootstrap/node --recursive"
+  }
+}