From 7b0d7913185e885f89bc6ac2a89b8963a4c53788 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 4 Apr 2017 16:42:27 -0600 Subject: [PATCH 1/4] v1.0.7 --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 788e053..26ba02f 100644 --- a/bower.json +++ b/bower.json @@ -39,5 +39,5 @@ "test", "tests" ], - "version": "1.0.6" + "version": "1.0.7" } diff --git a/package.json b/package.json index f140b3a..739af3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oauth3.js", - "version": "1.0.6", + "version": "1.0.7", "description": "The world's smallest, fastest, and most secure OAuth3 (and OAuth2) JavaScript implementation.", "main": "oauth3.node.js", "scripts": { From f72c1a333c7c3c98edb1946f3f24f8c20c102786 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 4 Apr 2017 16:43:28 -0600 Subject: [PATCH 2/4] red herring strikes again - let's log the correct variable, eh? --- oauth3.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth3.core.js b/oauth3.core.js index 3b31951..d918caf 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -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); From 9969c4dba907e3fade911565775d1e044f4d378e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 4 Apr 2017 16:43:47 -0600 Subject: [PATCH 3/4] v1.0.8 --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 26ba02f..59aba45 100644 --- a/bower.json +++ b/bower.json @@ -39,5 +39,5 @@ "test", "tests" ], - "version": "1.0.7" + "version": "1.0.8" } diff --git a/package.json b/package.json index 739af3e..6d1b4ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oauth3.js", - "version": "1.0.7", + "version": "1.0.8", "description": "The world's smallest, fastest, and most secure OAuth3 (and OAuth2) JavaScript implementation.", "main": "oauth3.node.js", "scripts": { From 3a805d071a4a84371b9bc674839d2511dd9aa4d3 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 5 Apr 2017 19:02:06 -0600 Subject: [PATCH 4/4] set provider_uri and client_uri from session when manually setting --- oauth3.core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oauth3.core.js b/oauth3.core.js index d918caf..43acd4a 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -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); } @@ -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); } }