mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
18 lines
296 B
JavaScript
Executable file
18 lines
296 B
JavaScript
Executable file
var jwt = require('jsonwebtoken');
|
|
|
|
module.exports = {
|
|
sync: true,
|
|
|
|
inputs: {
|
|
payload: {
|
|
type: 'json',
|
|
required: true
|
|
}
|
|
},
|
|
|
|
fn: function(inputs, exits) {
|
|
const token = jwt.sign(inputs.payload, sails.config.session.secret);
|
|
|
|
return exits.success(token);
|
|
}
|
|
};
|