24 lines
639 B
JavaScript
24 lines
639 B
JavaScript
|
;(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;
|
||
|
|
||
|
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));
|