ado

adoid

OpenID provider for Active Directory running on Node.js, express, ldap.js, and node-openidconnect

Showing:

Popularity

Downloads/wk

1

GitHub Stars

1

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

21

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

ADOID

Development on ADOID has ceased for the foreseeable future. See Anvil Connect for a maintained alternative.

ADOID is an Active Directory OpenID Connect provider that runs on express.

Using ADOID with passport-openidconnect

NOTE: This may not be the way that ADOID will work in the future. In the meantime, however, this seems to be what currently works.

passport.use(new OIDCStrategy({
  authorizationURL: 'http://adoid/authorization',
  tokenURL: 'http://adoid/token',
  userInfoURL: 'http://adoid/userinfo',
  clientID: 'my-client-key',
  clientSecret: 'my-client-secret',
  callbackURL: '/callback',
  scope: ['profile']
}, function (iss, sub, profile, done) {
  var user = {
    sub: sub,
    displayName: profile.displayName,
    name: profile.name,
    email: profile.email,
    picture: profile.picture,
    roles: profile._json.roles
  };
  done(null, user);
}));

passport.serializeUser(function(user, done) {
  done(null, user);
});

passport.deserializeUser(function(user, done) {
  done(null, user);
});

app.use(passport.initialize());
app.use(passport.session());

app.use(express.static(path.join(__dirname, 'public')));

app.get('/signin', 
passport.authenticate('openidconnect'),
function(req, res) {
});
app.get('/callback', 
passport.authenticate('openidconnect', { failureRedirect: '/', failureFlash: true }),
function(req, res) {
  res.redirect('/');
});
app.get('/signout', function(req, res){
req.logout();
res.redirect('/');
});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial