Merge branch 'v1.0' of git.daplie.com:OAuth3/oauth3.js into v1.0

This commit is contained in:
AJ ONeal 2017-04-14 16:50:42 -06:00
commit 0aa1f614fa
3 changed files with 6 additions and 4 deletions

View File

@ -39,5 +39,5 @@
"test",
"tests"
],
"version": "1.0.6"
"version": "1.0.8"
}

View File

@ -628,7 +628,7 @@
function fetch() {
if (preq.session) {
// TODO check session.token.aud against preq.url to make sure they match
console.warn("[security] session audience checking has not been implemented yet (it's up to you to check)");
//console.warn("[security] session audience checking has not been implemented yet (it's up to you to check)");
preq.headers = preq.headers || {};
preq.headers.Authorization = 'Bearer ' + (preq.session.access_token || preq.session.accessToken);
}
@ -1037,7 +1037,7 @@
}
, api: function (providerUri, opts) {
if (!OAUTH3.api[opts.api]) {
return OAUTH3.PromiseA.reject(new Error("No API for '" + providerUri + "'"));
return OAUTH3.PromiseA.reject(new Error("No API for '" + opts.api + "'"));
}
return OAUTH3.api[opts.api](providerUri, opts);
@ -1086,6 +1086,8 @@
if (!me._providerUri) {
throw new Error("'providerUri' was not supplied");
}
opts.session.provider_uri = me._providerUri
opts.session.client_uri = me._clientUri
me.session(opts.session, opts.sessionId);
}
}

View File

@ -1,6 +1,6 @@
{
"name": "oauth3.js",
"version": "1.0.6",
"version": "1.0.8",
"description": "The world's smallest, fastest, and most secure OAuth3 (and OAuth2) JavaScript implementation.",
"main": "oauth3.node.js",
"scripts": {