mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-09-06 21:24:37 +08:00
started with special access tokens
This commit is contained in:
parent
2c92b98c8b
commit
853b38a402
2 changed files with 29 additions and 0 deletions
20
bin/access-tokens.js
Executable file
20
bin/access-tokens.js
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const config = require('wild-config');
|
||||
const db = require('../lib/db');
|
||||
const errors = require('../lib/errors');
|
||||
const log = require('npmlog');
|
||||
|
||||
// Initialize database connection
|
||||
db.connect(err => {
|
||||
if (err) {
|
||||
log.error('Db', 'Failed to setup database connection');
|
||||
errors.notify(err);
|
||||
return setTimeout(() => process.exit(1), 3000);
|
||||
}
|
||||
|
||||
log.info('Future feature');
|
||||
process.exit();
|
||||
});
|
|
@ -10,6 +10,15 @@ secure=false
|
|||
# http://localhost:8080/users?accessToken=somesecretvalue
|
||||
#accessToken="somesecretvalue"
|
||||
|
||||
[accessControl]
|
||||
# If true then require a valid access token to perform API calls
|
||||
enabled=false
|
||||
# If enabled then encrypt access tokens with the secret password. By default the tokens
|
||||
# are not encrypted and stored as cleartext. Once set up do not change these values,
|
||||
# otherwise decrypting tokens is going to fail
|
||||
#cipher="aes192"
|
||||
#secret="a secret cat"
|
||||
|
||||
[tls]
|
||||
# If certificate path is not defined, use global or built-in self-signed certs
|
||||
#key="/path/to/server/key.pem"
|
||||
|
|
Loading…
Add table
Reference in a new issue