Skip to content

Instantly share code, notes, and snippets.

@phillipsmith
phillipsmith / auth-cache.js
Last active May 11, 2020 01:38
Express.js + Passport.js: LDAP Basic Authentication for Login and Bearer Token Authentication for everything else
/**
* Copyright (c) 2017, Three Pawns, Inc. All rights reserved.
*/
'use strict';
const config = require('config');
const crypto = require('crypto');
const uuid = require('uuid');
const NodeCache = require('node-cache');