maestro-server/server-app

View on GitHub
app/identity/config/auth_config_private.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
'use strict';

const {ExtractJwt} = require('passport-jwt');

module.exports = () => {
    const secret = process.env.MAESTRO_SECRETJWT_PRIVATE;

    return {
        jwtSecret: {
            secretOrKey: secret || 'defaultSecretKeyPrivate',
            jwtFromRequest: ExtractJwt.fromAuthHeaderWithScheme('jwt')
        },
        jwtSession: {
            session: false
        }
    };
};