Check a token's claim to be equal a given {@Link JSONPrimitive} (string, number, boolean or null) raises a 401 invalid_token error if the value of the claim does not match.
string
number
boolean
null
invalid_token
app.use(auth());app.get('/admin', claimEquals('isAdmin', true), (req, res) => { ... }); Copy
app.use(auth());app.get('/admin', claimEquals('isAdmin', true), (req, res) => { ... });
Check a token's claim to be equal a given {@Link JSONPrimitive} (
string
,number
,boolean
ornull
) raises a 401invalid_token
error if the value of the claim does not match.