Skip to content

Commit

Permalink
Finish up authentication code. Should close #1.
Browse files Browse the repository at this point in the history
Also fix a spelling mistake in a file name and start work on Passport strategy (#2).

Signed-off-by: Skye M <[email protected]>
  • Loading branch information
skyem123 committed Jun 28, 2015
1 parent 4076bcd commit a562ea8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
"use strict";

exports.auth = require("./lib/auth.js");
exports.Srategy = require("./lib/strategy.js");
5 changes: 1 addition & 4 deletions lib/auth.js
Original file line number Diff line number Diff line change
@@ -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'),
Expand Down Expand Up @@ -43,3 +39,4 @@ exports.verifyUser = function verifyUser(userName, serverHash, callback) { // Lo
}
});
}

5 changes: 4 additions & 1 deletion lib/stategy.js → lib/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a562ea8

Please sign in to comment.