Skip to content

Commit 4092dfb

Browse files
committed
Subject: Unprivate Service_.prototype.getToken_
Issue: #71 Comment:
1 parent 641e984 commit 4092dfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Service.gs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ Service_.prototype.handleCallback = function(callbackRequest) {
318318
* @return {boolean} true if the user has access to the service, false otherwise.
319319
*/
320320
Service_.prototype.hasAccess = function() {
321-
var token = this.getToken_();
321+
var token = this.getToken();
322322
if (!token || this.isExpired_(token)) {
323323
if (token && token.refresh_token) {
324324
try {
@@ -351,7 +351,7 @@ Service_.prototype.getAccessToken = function() {
351351
if (!this.hasAccess()) {
352352
throw 'Access not granted or expired.';
353353
}
354-
var token = this.getToken_();
354+
var token = this.getToken();
355355
return token.access_token;
356356
};
357357

@@ -447,7 +447,7 @@ Service_.prototype.refresh = function() {
447447
'Client Secret': this.clientSecret_,
448448
'Token URL': this.tokenUrl_
449449
});
450-
var token = this.getToken_();
450+
var token = this.getToken();
451451
if (!token.refresh_token) {
452452
throw 'Offline access is required.';
453453
}
@@ -502,7 +502,7 @@ Service_.prototype.saveToken_ = function(token) {
502502
* @return {Object} The token, or null if no token was found.
503503
* @private
504504
*/
505-
Service_.prototype.getToken_ = function() {
505+
Service_.prototype.getToken = function() {
506506
validate_({
507507
'Property store': this.propertyStore_
508508
});

0 commit comments

Comments
 (0)