Skip to content

Commit b0c85fc

Browse files
Add function checkToken()
1 parent 785bb82 commit b0c85fc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

build/jso.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,13 @@ define('jso',['require','exports','module','./store','./utils','./Config'],funct
11341134

11351135
};
11361136

1137+
JSO.prototype.checkToken = function(opts) {
1138+
// var scopesRequest = this._getRequestScopes(opts);
1139+
1140+
var scopesRequire = this._getRequiredScopes(opts);
1141+
return store.getToken(this.providerID, scopesRequire);
1142+
};
1143+
11371144

11381145
// exp.jso_ensureTokens = function (ensure) {
11391146
// var providerid, scopes, token;

src/jso.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,13 @@ define(function(require, exports, module) {
332332

333333
};
334334

335+
JSO.prototype.checkToken = function(opts) {
336+
// var scopesRequest = this._getRequestScopes(opts);
337+
338+
var scopesRequire = this._getRequiredScopes(opts);
339+
return store.getToken(this.providerID, scopesRequire);
340+
};
341+
335342

336343
// exp.jso_ensureTokens = function (ensure) {
337344
// var providerid, scopes, token;

0 commit comments

Comments
 (0)