Skip to content

spitimage/jwt-central-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jwt-central-client

Build Status

Express middleware for the jwt-central authentication service.

Initialization

// Initialize the jwt-central-client with the host params for the jwt-central server
jwtCentralClient.init('localhost', 8000);

Authentication

// Example API endpoint that shows the current decoded jwt
app.get('/api/jwt', jwtCentralClient.auth, function (req, res) {
  res.json(req.jwt);
});

Installation

npm install
cd example
npm install

Running the example application

After modifying the configuration parameters in app.js:

cd example
node app.js

Testing

npm install -g mocha
mocha

Linting

npm install -g jshint
jshint index.js
jshint example
jshint test

License

MIT

About

Client module for the jwt-central service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published