2017-08-14 19:45:19 +00:00
|
|
|
;(function (exports) {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var OAUTH3 = exports.OAUTH3 = exports.OAUTH3 || require('./oauth3.core.js').OAUTH3;
|
|
|
|
|
|
|
|
OAUTH3._pkgs['www@daplie.com'] = {
|
|
|
|
add: function (opts) {
|
|
|
|
var providerUri = opts.audience;
|
|
|
|
var session = opts.session;
|
2017-08-21 17:21:00 +00:00
|
|
|
debugger;
|
2017-08-14 19:45:19 +00:00
|
|
|
return OAUTH3.request({
|
|
|
|
method: 'POST'
|
|
|
|
, url: OAUTH3.url.normalize(providerUri)
|
|
|
|
+ '/api/www@daplie.com/acl/www/' + opts.hostname
|
|
|
|
, session: session
|
|
|
|
, multipart: opts.multipart // special property to be figured out by browser request code
|
|
|
|
}).then(function (res) {
|
|
|
|
return res;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}('undefined' !== typeof exports ? exports : window));
|