From 4c5d57fd8c6c9a952cb686401d0a9198207abc15 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 19 Jan 2017 01:23:08 +0000 Subject: [PATCH] add refreshToken --- oauth3.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/oauth3.js b/oauth3.js index 1c66232..2194cf3 100644 --- a/oauth3.js +++ b/oauth3.js @@ -194,6 +194,20 @@ }); }; + oauth3.refreshToken = function (providerUri, opts) { + return oauth3.discover(providerUri, opts).then(function (directive) { + var prequest = core.refreshToken(directive, opts); + + console.log('[DEBUG] [core] refreshToken URL', prequest); + + return oauth3.request({ + url: prequest.url + , method: prequest.method + , data: prequest.data + }); + }); + }; + oauth3.frameRequest = function (url, state, opts) { var promise;