npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hades-krb5

v0.2.3

Published

Kerberos library for Node.js forked to fix some C++ issues

Downloads

5

Readme

Kerberos for Node.js

krb5 is a Node.js native binding for kerberos. It is a node.js implementation of kerberos client tools, such as :

  • kinit (keytab, or password)
  • kdestroy It uses the MIT Kerberos native library. It is also able to generate a SPNEGO token. SPNEGO is a GSS mechanism to authenticate through HTML requests. Please see the first example in the samples directory for a concrete use case.

Installation

The installation assumes that you have mit-kerberos installed on your computer. On Linux, you shall be all set. On Windows or Mac OS, please read the corresponding section below. Once mit-kerberos is installed, run

npm install

Windows

To compile this library in windows, you need a complete visual studio compile chain, please refer to this webpage. If you have a 32 bit OS, please delete binding.gyp and rename _binding32.gyp before install.

Mac OS X

If you encounter troubles with your kerberos version, please compile kerberos using the following instructions.

Your include path must contain: krb5.h

  • gssapi.h
  • gssapi/gssapi_krb5.h

Your library path must contain:

  • krb5 library
  • gssapi_krb5 library

Here's some instructions on how to install the Kerberos and GSS libraries. You can download the latest version of the MIT Kerberos Distribution. Unless you specify the "--prefix" option to configure, the library will be installed inside "/usr/local".

wget http://web.mit.edu/kerberos/dist/krb5/1.15/krb5-1.15-beta1.tar.gz 
tar -xzf krb5-1.15-beta1.tar.gz 
cd krb5-1.15-beta1/src
./configure
make
sudo make install

If kerberos is not installed in a directory not included in include and/or library path (if you have manually compiled kerberos in a specific directory for example), please modify the binding.gyp present in the package root folder with the following properties:

{
  'targets': [{
    'target_name': 'krb5',
    'include_dirs': ['/path/to/kerberos/include/dir/','/path/to/kerberos_gssapi/include/dir/'],
    'libraries': ['/path/to/libkrb5', '/path/to/libgssapi_krb5']
  }]
}

Usage

API

k = krb5
  principal
  password: 'mypass' # If keytab not set
  keytab: '/etc/security/keytabs/me.keytab' # If password not set, default keytab if not defined
  service_principal: '[email protected]'
  renew: true
k.kinit options, (err) ->
k.kdestroy (err) ->
k.token (err, token) ->
  console.log token

Spnego

krb5 = require 'krb5'
krb5.spnego
  principal: '[email protected]'
  password: 'mypass' # If keytab not set
  keytab: '/etc/security/keytabs/me.keytab'  # If password not set, default keytab if not defined
  service_principal: '[email protected]'
, (err, token) ->
  console.log token

for more example, see the samples directory.