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

passport-kerberos

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-kerberos

Kerberos 5 username and password authentication strategy for Passport.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

passport-kerberos

Kerberos authentication strategy for Passport.

Passport strategy for authenticating with a username and password against a kerberos server.

This module lets you authenticate using a username and password in your Node.js applications. By plugging into Passport, kerberos authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.

Installing the required headers on Ubuntu

sudo apt-get install libkrb5-dev

Install

$ npm install passport-kerberos

Usage

Configure Strategy

The kerberos authentication strategy authenticates users using a username and password. The strategy requires a verify callback, which accepts these credentials and calls done providing a user.

// The realm used for kerberos authentication.
var REALM="EXAMPLE.COM"

passport.use(new KerberosStrategy(
  function(username, done) {
    User.findOne({ username: username }, function (err, user) {
      if (err) { return done(err); }
      if (!user) { return done(null, false); }
      return done(null, user, REALM);
    });
  }
));
Authenticate Requests

Use passport.authenticate(), specifying the 'kerberos' strategy, to authenticate requests.

For example, as route middleware in an Express application:

app.post('/login', 
  passport.authenticate('kerberos', { failureRedirect: '/login' }),
  function(req, res) {
    res.redirect('/');
  });

Examples

(To be added.)

Credits

License

The MIT License passport-kerberos - Copyright (c) 2013 Joshua Heiks Passport-Local - Copyright (c) 2011-2013 Jared Hanson <http://jaredhanson.net/>

Keywords

FAQs

Package last updated on 08 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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