keep package vars even when then instance is changed

This commit is contained in:
aj 2017-08-23 16:16:18 +00:00
parent 5f68ea19e2
commit bf71399d12
1 changed files with 4 additions and 2 deletions

View File

@ -1274,6 +1274,8 @@
}
, pkg: function (pkgname) {
var me = this;
var issuer = me._identityProviderUri;
var audience = me._resourceProviderDirectives.api;
var pkg;
var result = {};
@ -1286,8 +1288,8 @@
Object.keys(pkg).forEach(function (key) {
result[key] = function (opts) {
opts = opts || {};
opts.session = OAUTH3.hooks.session._getCached(me._identityProviderUri);
opts.audience = me._resourceProviderDirectives.api;
opts.session = OAUTH3.hooks.session._getCached(issuer);
opts.audience = audience;
return pkg[key](opts);
};
});