mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
parent
77ac2cf1b1
commit
2b4c2b0f49
40 changed files with 273 additions and 133 deletions
|
@ -15,10 +15,16 @@ module.exports = {
|
|||
},
|
||||
|
||||
fn(inputs) {
|
||||
let payload;
|
||||
try {
|
||||
return jwt.verify(inputs.token, sails.config.session.secret);
|
||||
payload = jwt.verify(inputs.token, sails.config.session.secret);
|
||||
} catch (error) {
|
||||
throw 'invalidToken';
|
||||
}
|
||||
|
||||
return {
|
||||
subject: payload.sub,
|
||||
issuedAt: new Date(payload.iat * 1000),
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue