Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

passport-ldapauth

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-ldapauth - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

demos.js

2

CHANGES.md
## Changes
* v0.2.4
* Inherit from [passport-strategy](https://github.com/jaredhanson/passport-strategy) like `passport-local` and others do.
* v0.2.3

@@ -4,0 +6,0 @@ * Documentation using the same keys as ldapjs (bindDn and bindCredentials)

var Strategy = require('./strategy');
// Export directly from package since there is nothing else to export
exports = module.exports = Strategy;
// Export constructor like before for compatibility
exports.Strategy = Strategy;

2

lib/passport-ldapauth/strategy.js

@@ -6,3 +6,3 @@ "use strict";

*/
var passport = require('passport'),
var passport = require('passport-strategy'),
LdapAuth = require('ldapauth-fork'),

@@ -9,0 +9,0 @@ util = require('util');

@@ -15,3 +15,3 @@ {

],
"version": "0.2.3",
"version": "0.2.4",
"license": {

@@ -33,14 +33,12 @@ "type": "MIT",

"dependencies": {
"ldapauth-fork": "~2.2.17"
"passport-strategy": "1.x.x",
"ldapauth-fork": "~2.2.18"
},
"peerDependencies": {
"passport": "~0.2.0"
},
"devDependencies": {
"body-parser": "1.9.x",
"chai": "1.9.x",
"body-parser": "1.10.x",
"chai": "1.10.x",
"express": "4.9.x",
"ldapjs": "0.7.x",
"mocha": "1.21.x",
"supertest": "0.14.x",
"mocha": "2.1.x",
"supertest": "0.15.x",
"passport": "~0.2.0"

@@ -47,0 +45,0 @@ },

@@ -21,3 +21,3 @@ # passport-ldapauth

```javascript
var LdapStrategy = require('passport-ldapauth').Strategy;
var LdapStrategy = require('passport-ldapauth');

@@ -69,3 +69,4 @@ passport.use(new LdapStrategy({

passport = require('passport'),
LdapStrategy = require('passport-ldapauth').Strategy;
bodyParser = require('body-parser'),
LdapStrategy = require('passport-ldapauth');

@@ -86,6 +87,5 @@ var OPTS = {

app.configure(function() {
app.use(express.bodyParser());
app.use(passport.initialize());
});
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(passport.initialize());

@@ -147,3 +147,3 @@ app.post('/login', passport.authenticate('ldapauth', {session: false}), function(req, res) {

var LdapStrategy = require('passport-ldapauth').Strategy;
var LdapStrategy = require('passport-ldapauth');

@@ -150,0 +150,0 @@ passport.use(new LdapStrategy(getLDAPConfiguration,

var should = require('chai').Should(),
LdapStrategy = require('passport-ldapauth').Strategy,
LdapStrategy = require('passport-ldapauth'),
request = require('supertest'),

@@ -48,2 +48,22 @@ ldapserver = require('./ldapserver'),

it("should export Strategy constructor directly", function(cb) {
require('passport-ldapauth').should.be.a('function');
cb();
});
it("should export Strategy constructor separately as well", function(cb) {
var strategy = require('passport-ldapauth').Strategy;
strategy.should.be.a('function');
(function() {
new strategy(BASE_OPTS);
}).should.not.throw(Error);
cb();
});
it("should be named ldapauth", function(cb) {
var s = new LdapStrategy(BASE_OPTS);
s.name.should.equal('ldapauth');
cb();
});
it("should throw an error if no arguments are provided", function(cb) {

@@ -50,0 +70,0 @@ (function() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc