All Projects → 99x → azure-jwt-verify

99x / azure-jwt-verify

Licence: MIT license
Verify jwt token issued from azure active directory b2c service

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to azure-jwt-verify

Is Google
Verify that a request is from Google crawlers using Google's DNS verification steps
Stars: ✭ 82 (+382.35%)
Mutual labels:  verify
Immudb
immudb - world’s fastest immutable database, built on a zero trust model
Stars: ✭ 3,743 (+21917.65%)
Mutual labels:  verify
verify-apple-id-token
Verify the Apple id token on the server side.
Stars: ✭ 49 (+188.24%)
Mutual labels:  verify
Qa Checks V4
PowerShell scripts to ensure consistent and reliable build quality and configuration for your servers
Stars: ✭ 94 (+452.94%)
Mutual labels:  verify
Paseto
PASETO (Platform-Agnostic SEcurity TOkens) for Node.js with no dependencies
Stars: ✭ 134 (+688.24%)
Mutual labels:  verify
Android Play Safetynet
Samples for the Google SafetyNet Attestation API
Stars: ✭ 195 (+1047.06%)
Mutual labels:  verify
Vonage Dotnet Sdk
Nexmo REST API client for .NET, ASP.NET, ASP.NET MVC written in C#. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Stars: ✭ 76 (+347.06%)
Mutual labels:  verify
qed
The scalable, auditable and high-performance tamper-evident log project
Stars: ✭ 87 (+411.76%)
Mutual labels:  verify
Elm Verify Examples
Stars: ✭ 147 (+764.71%)
Mutual labels:  verify
discord-group-spammer
You need to run all_together.py and follow the instructions on the readme below. This Tool allows you to use various discord exploits for educational use.
Stars: ✭ 45 (+164.71%)
Mutual labels:  verify
Piracychecker
An Android library that prevents your app from being pirated / cracked using Google Play Licensing (LVL), APK signature protection and more. API 14+ required.
Stars: ✭ 1,359 (+7894.12%)
Mutual labels:  verify
Hibp
A composer package to verify if a password was previously used in a breach using Have I Been Pwned API.
Stars: ✭ 126 (+641.18%)
Mutual labels:  verify
Vuejs Rails Starterkit
Vue.js + Rails Starting Kit GitHub Template to develop Hybrid Mobile Application: https://vuejs-rails-starterkit.herokuapp.com
Stars: ✭ 205 (+1105.88%)
Mutual labels:  verify
Directorylister
📂 Directory Lister is the easiest way to expose the contents of any web-accessible folder for browsing and sharing.
Stars: ✭ 1,261 (+7317.65%)
Mutual labels:  verify
form-bunch
Form-bunch is a component like plugin that make it easier to write form, you could add the most of components what you want to form-bunch for build various form.
Stars: ✭ 18 (+5.88%)
Mutual labels:  verify
Vonage Java Sdk
Vonage Server SDK for Java. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Stars: ✭ 75 (+341.18%)
Mutual labels:  verify
Strsync
A CLI tool for localization resource management on Xcode. Built with Google Translator.
Stars: ✭ 157 (+823.53%)
Mutual labels:  verify
camunda-platform-scenario
Easily execute Camunda process scenarios and verify your expectations with Given/Then/When style tests.
Stars: ✭ 58 (+241.18%)
Mutual labels:  verify
checkif.js
Javascript check library
Stars: ✭ 30 (+76.47%)
Mutual labels:  verify
pgpverify-maven-plugin
Verify Open PGP / GPG signatures plugin
Stars: ✭ 42 (+147.06%)
Mutual labels:  verify

azure-jwt-verify

npm version License: MIT

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 = require('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

})

Response Examples

For valid and authorize JWT token.

Response body:

{
   "status": "success",
   "message": {
      "exp": 1486111778,
      "nbf": 1486108178,
      "ver": "1.0",
      "iss": "https://login.microsoftonline.com/9434db1e-33cd-4607-b350-9d947127a5de/v2.0/",
      "sub": "ff8490cb-2bda-4cc8-b801-4a22a8620c59",
      "aud": "dfc54797-efe3-4db3-a1e1-422b4ecf27d7",
      "nonce": "defaultNonce",
      "iat": 1486108178,
      "auth_time": 1486108178,
      "oid": "ff8490cb-2bda-4cc8-b801-4a22a8620c59",
      "name": "jon snow",
      "extension_NIC": "933132325V",
      "emails": [
         "[email protected]"
      ],
      "tfp": "B2C_1_b2c_1_sign_in"
   }
}

For valid but expired JWT token.

Response body:

{
   "status": "error",
   "message": {
      "name": "TokenExpiredError",
      "message": "jwt expired",
      "expiredAt": "2017-02-02T12:30:11.000Z"
   }
}

For invalid JWT token.

Response body:

{
   "status": "error",
   "message": "Error Decoding JWT Token"
}

Links

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].