pcf-jwt-verify

1.0.2 • Public • Published

pcf-jwt-verify

This Plugin Requires

  • NodeJS Runtime

Features

  • this repo is a fork of azure-jwt-verify that is changed.
  • Verify JWT Token issued by PCF

Install Plugin

npm install --save pcf-jwt-verify

Initialize module

var pcfJWT = require('pcf-jwt-verify');
 

Configuration and the JWT to verify

var jwtToken = "YOUR_JWT_TOKEN_TO_VERIFY"; // You can find this token after logging in to pcf sso
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 PCF 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
 
})

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i pcf-jwt-verify

    Weekly Downloads

    0

    Version

    1.0.2

    License

    none

    Last publish

    Collaborators

    • bolty2142