How to use the unleash-server.User function in unleash-server

To help you get started, we’ve selected a few unleash-server examples, based on popular ways it is used in public projects.

github kindlyops / havengrc / unleash / index.js View on Github external
app.use('/api/admin/', (req, res, next) => {
        const email = req.get('X-Auth-Email');

        if (email) {
            // TODO: need to do some verification of credentials here, probably
            // validate X-Auth-Token signature

            const user = new unleash.User({ email: `${email}` });
            req.user = user;
            next();
        } else {
            return res
                .status('401')
                .end('access denied');
        }
    });
github kindlyops / havengrc / unleash / google-auth-hook.js View on Github external
(accessToken, refreshToken, profile, done) => {
            done(
                null,
                new User({
                    name: profile.displayName,
                    email: profile.emails[0].value,
                })
            );
        }
    )

unleash-server

Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.

Apache-2.0
Latest version published 12 days ago

Package Health Score

93 / 100
Full package analysis