Created
September 4, 2017 01:45
-
-
Save mingder78/c57a1175f7bb9f3069c7a0bc0036e482 to your computer and use it in GitHub Desktop.
hapi collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Load modules | |
const Boom = require('boom'); | |
const Hoek = require('hoek'); | |
const Joi = require('joi'); | |
// Declare internals | |
const internals = {}; | |
exports.register = function (server, options, next) { | |
server.auth.scheme('cookie', internals.implementation); | |
next(); | |
}; | |
exports.register.attributes = { | |
pkg: require('../package.json') | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'use strict';
// Load modules
const Boom = require('boom');
const Hoek = require('hoek');
// Declare internals
const internals = {};
exports.register = function (plugin, options, next) {
};
exports.register.attributes = {
pkg: require('../package.json')
};
internals.implementation = function (server, options) {
const scheme = {
authenticate: function (request, reply) {
}
}
return scheme;
}