jwt

jwt

Adapt jwt-js for use in Node.js, nothing special.

Showing:

Popularity

Downloads/wk

649

GitHub Stars

28

Maintenance

Last Commit

9yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

15.0KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Reviews

Average Rating

4.5/52
Read All Reviews
sunithvs

Top Feedback

2Easy to Use
1Great Documentation
1Performant
1Bleeding Edge

Readme

jwt-node

A slight adaptation of jwt-js for Node.

 var jwt = require('jwt'),
     payload = {
         scope: 'client:outgoing?clientName=matt',
         iss: 'APP_SID',
         expires: Math.round((new Date().getTime()/1000)) + 3600
     },
     token = new jwt.WebToken(JSON.stringify(payload), JSON.stringify({typ:'JWT', alg:'HS256'}));
  console.log(token.serialize('hmackey'));

Installation

 $ npm install jwt

Known Issues

  • none

Licenses

Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

Contributor(s): Michael Hanson mhanson@mozilla.com

Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.

Copyright (c) 2011 Matt Robenolt <root@drund.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Rate & Review

Great Documentation1
Easy to Use2
Performant1
Highly Customizable0
Bleeding Edge1
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
sunith vs50 Ratings62 Reviews
Computer science student of Cochin university of science and technology.
2 months ago

This makes user credentials verification a no task. I can just create a JWT from the information entered by the user and not worry about scaling my database to hold all the user data. I find the algorithm and logic behind JWT really amazing. This might be because I am a more low level guy but I find it really fascinating to read through the implementation of JWT. I really recommend you give JWT a try just to experience the power it provides.


0

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial