@@ -318,7 +318,7 @@ Service_.prototype.handleCallback = function(callbackRequest) {
318
318
* @return {boolean } true if the user has access to the service, false otherwise.
319
319
*/
320
320
Service_ . prototype . hasAccess = function ( ) {
321
- var token = this . getToken_ ( ) ;
321
+ var token = this . getToken ( ) ;
322
322
if ( ! token || this . isExpired_ ( token ) ) {
323
323
if ( token && token . refresh_token ) {
324
324
try {
@@ -351,7 +351,7 @@ Service_.prototype.getAccessToken = function() {
351
351
if ( ! this . hasAccess ( ) ) {
352
352
throw 'Access not granted or expired.' ;
353
353
}
354
- var token = this . getToken_ ( ) ;
354
+ var token = this . getToken ( ) ;
355
355
return token . access_token ;
356
356
} ;
357
357
@@ -447,7 +447,7 @@ Service_.prototype.refresh = function() {
447
447
'Client Secret' : this . clientSecret_ ,
448
448
'Token URL' : this . tokenUrl_
449
449
} ) ;
450
- var token = this . getToken_ ( ) ;
450
+ var token = this . getToken ( ) ;
451
451
if ( ! token . refresh_token ) {
452
452
throw 'Offline access is required.' ;
453
453
}
@@ -500,9 +500,8 @@ Service_.prototype.saveToken_ = function(token) {
500
500
/**
501
501
* Gets the token from the service's property store or cache.
502
502
* @return {Object } The token, or null if no token was found.
503
- * @private
504
503
*/
505
- Service_ . prototype . getToken_ = function ( ) {
504
+ Service_ . prototype . getToken = function ( ) {
506
505
validate_ ( {
507
506
'Property store' : this . propertyStore_
508
507
} ) ;
0 commit comments