diff --git a/index.js b/index.js index 3918c74..3f1c2ef 100644 --- a/index.js +++ b/index.js @@ -1 +1,4 @@ "use strict"; + +exports.auth = require("./lib/auth.js"); +exports.Srategy = require("./lib/strategy.js"); diff --git a/lib/auth.js b/lib/auth.js index 67596b7..96b389a 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -1,9 +1,5 @@ "use strict"; - // This file is for Minecraft authentication code. -var name = require('../package.json').name, - version = require('../package.json').version, - host = "https://sessionserver.mojang.com"; var mcHash = require('./mcHash'), // Minecraft hashing stuff. crypto = require('crypto'), @@ -43,3 +39,4 @@ exports.verifyUser = function verifyUser(userName, serverHash, callback) { // Lo } }); } + diff --git a/lib/stategy.js b/lib/strategy.js similarity index 61% rename from lib/stategy.js rename to lib/strategy.js index 0debb37..581cd97 100644 --- a/lib/stategy.js +++ b/lib/strategy.js @@ -3,7 +3,10 @@ var util = require('util'), Strategy = require('passport-strategy'); -function MCMUCHStrategy(...) { +var mcAuth = require('./auth'); + +function MCMUCHStrategy(verify) { + if (!verify) throw new Error('MCMUCG authentication strategy requires a verify function'); Strategy.call(this); }