Check a token's claim to include a number of given {@Link JSONPrimitive}s (string, number, boolean or null) raises a 401 invalid_token error if the value of the claim does not include all the given values.
string
number
boolean
null
invalid_token
app.use(auth());app.get('/admin/edit', claimIncludes('role', 'admin', 'editor'), (req, res) => { ... }); Copy
app.use(auth());app.get('/admin/edit', claimIncludes('role', 'admin', 'editor'), (req, res) => { ... });
Rest
Check a token's claim to include a number of given {@Link JSONPrimitive}s (
string
,number
,boolean
ornull
) raises a 401invalid_token
error if the value of the claim does not include all the given values.