New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cds-common-jwt-support

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cds-common-jwt-support

support common jwt with jose for @sap/cap

0.0.2
latest
npm
Version published
Maintainers
1
Created
Source

cds common jwt support

support jwt without xsuaa ans xssec, and give user much more features with jose

node-test codecov npm

Quality Gate Status Security Rating Vulnerabilities

Get Started

simply integrate the cds-common-jwt-support to you CAP nodejs project

npm i -S cds-common-jwt-support jose

server.js

const cds = require("@sap/cds");
const { configureJwt } = require("cds-common-jwt-support");
const jose = require("jose")

const publicKey = `
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7g4mOYr136bOzOB4hd+e
......
-----END PUBLIC KEY-----
`

cds.on("bootstrap", async (app) => {
  configureJwt(app, {
    key: await jose.importSPKI(publicKey, "PS256")
  });
});

module.exports = cds.server;

package.json

{
  "requires": {
    "auth": {
      "kind": "common-jwt"
    },
    "common-jwt": {
      "impl": "cds-common-jwt-support"
    }
  }
}

CHANGELOG

LICENSE

Keywords

CAP

FAQs

Package last updated on 13 Apr 2022

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