added some more defaults to the azp and aud of created tokens

This commit is contained in:
tigerbot 2017-07-26 18:12:57 -06:00
parent 95bc9869ad
commit 67c8ba56e1

View File

@ -315,7 +315,7 @@ function create(app) {
return { return {
sub: account.accountId, sub: account.accountId,
aud: req.params.aud || req.body.aud || req.experienceId, aud: req.params.aud || req.body.aud || req.experienceId,
azp: req.params.azp || req.body.azp || req.experienceId, azp: req.params.azp || req.body.azp || req.body.client_id || req.body.client_uri || req.experienceId,
}; };
}); });
}); });
@ -324,8 +324,8 @@ function create(app) {
return require('./common').checkIsserToken(req, req.params.sub || req.body.sub).then(function (sub) { return require('./common').checkIsserToken(req, req.params.sub || req.body.sub).then(function (sub) {
return { return {
sub: sub, sub: sub,
aud: req.params.aud || req.body.aud, aud: req.params.aud || req.body.aud || req.experienceId,
azp: req.params.azp || req.body.azp, azp: req.params.azp || req.body.azp || req.body.client_id || req.body.client_uri,
exp: req.oauth3.token.exp, exp: req.oauth3.token.exp,
}; };
}); });