• Use this MW to protect a route based on the value of a specific claim.

    const { claimEquals } = require('express-openid-connect');

    app.get('/admin', claimEquals('isAdmin', true), (req, res) => {
    res.send(...);
    });

    Parameters

    • claim: string

      The name of the claim

    • value: string | number | boolean

      The value of the claim, should be a primitive

    Returns RequestHandler