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

@equisoft/oauth2orize-jwt-to-bearer

Package Overview
Dependencies
Maintainers
13
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equisoft/oauth2orize-jwt-to-bearer

JSON Web Token (JWT) Bearer Token Exchange Middleware for OAuth2orize.

  • 2.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
13
Created
Source

oauth2orize-jwt-to-bearer

JSON Web Token (JWT) Profile for OAuth 2.0 Authorization Grants Exchange Middleware for OAuth2orize

Deprecated See https://github.com/kronostechnologies/oauth2orize-bearer-to-bearer

Install

$ yarn install oauth2orize-jwt-to-bearer

Usage

Register Exchange Middleware

This exchange middleware is used to by clients to request an access token by using a JSON Web Token (JWT) generated by the client and verified by a Public Key stored on the OAuth 2.0 server. The exchange requires a verify callback, which accepts the client, scope and assertion(JWT), then calls done providing a access token.

var jwtBearer = require('oauth2orize-jwt-to-bearer').Exchange;

server.exchange('urn:ietf:params:oauth:grant-type:jwt-bearer', jwtBearer(function(client, scope, assertion, done) {

   AccessToken.create(client, scope, function(err, accessToken) {
     if (err) { return done(err); }
     done(null, accessToken);
   });
}));

Tests

$ yarn install --dev
$ yarn test

License

The MIT License

Keywords

FAQs

Package last updated on 05 Jul 2019

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