Use this MW to protect a route, checking that all values are in a claim.
const { claimIncludes } = require('express-openid-connect');app.get('/admin/delete', claimIncludes('roles', 'admin', 'superadmin'), (req, res) => { res.send(...);}); Copy
const { claimIncludes } = require('express-openid-connect');app.get('/admin/delete', claimIncludes('roles', 'admin', 'superadmin'), (req, res) => { res.send(...);});
The name of the claim
Rest
Claim values that must all be included
Use this MW to protect a route, checking that all values are in a claim.