Socket
Book a DemoInstallSign in
Socket

@lanetix/make-token

Package Overview
Dependencies
Maintainers
30
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@lanetix/make-token

make a jwt given an org or a user

unpublished
latest
npmnpm
Version
1.2.4
Version published
Weekly downloads
0
Maintainers
30
Weekly downloads
 
Created
Source

node-lanetix-make-token

Circle CI

Module to simplify interating with the auth service to get a token. Up to ~150MB of tokens are cached for slightly less than the time they take to expire (one day), at which point the least recently used are removed.

Installation

Ensure that you are are logged in as the lanetix npm user via npm login or use a .npmrc file with a token for the lanetix user.

npm install --save @lanetix/make-token

Usage

To use this library,

var makeToken = require('@lanetix/make-token')(
  'http://url.to.auth',
  'private....key....',
  'urn:issurer'
);


makeToken.forUser(1337) //user id
  .then(function (token) {
    //do stuff with token
  });

makeToken.forSystemUser(42) //org id
  .then(function (token) {
    //do stuff with token
  });

In order for auth to not 401, you'll need to register your service's public key here.

Keywords

lanetix

FAQs

Package last updated on 01 Mar 2017

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