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

azure-jwt-verify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-jwt-verify

Verify JWT Token issued by Azure Active Directory B2C

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
increased by14.63%
Maintainers
1
Weekly downloads
 
Created
Source

azure-jwt-verify

npm version license

This Plugin Requires

  • NodeJS Runtime

Features

  • Verify JWT Token issued by Azure Active Directory B2C
  • Automatically use the rotated public key from Azure Public Keys URL

Install Plugin

npm install --save azure-jwt-verify

Using Azure JWT Verify in your code

You need to define the following constants based on your Azure Active Directory B2C application configurations

###Initialize module

var azureJWT = requre('azure-jwt-verify');

###Configuration and the JWT to verify

var jwtToken = "YOUR_JWT_TOKEN_TO_VERIFY"; // You can find this url in Azure Active Directory B2C Section
const config = {
    JWK_URI: "",
    ISS: "",
    AUD: ""
};
  • JWK_URI and the ISS(Issuer) can be obtained from the metadata endpoint of the policies created in the B2C tenant.
  • AUD(Audience) is the Client ID of the application accessing the tenant.

###Verify Function

azureJWT.verify(jwtToken, config).then(function(decoded){
// success callback

}, function(error){
// error callback

})

License

MIT

Keywords

FAQs

Package last updated on 03 Feb 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

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