Add a JWT token authentication
This commit is contained in:
@@ -35,6 +35,10 @@ const argv = optimist
|
||||
default: null,
|
||||
describe: 'will bind incoming connections only on ports in range xxx:xxxx'
|
||||
})
|
||||
.options('jwt-shared-secret', {
|
||||
default: null,
|
||||
describe: 'JWT shared secret used to encode tokens'
|
||||
})
|
||||
.argv;
|
||||
|
||||
if (argv.help) {
|
||||
@@ -47,6 +51,7 @@ const server = CreateServer({
|
||||
secure: argv.secure,
|
||||
domain: argv.domain,
|
||||
range: argv.range,
|
||||
jwt_shared_secret: argv['jwt-shared-secret']
|
||||
});
|
||||
|
||||
server.listen(argv.port, argv.address, () => {
|
||||
|
||||
Reference in New Issue
Block a user