@@ -4,14 +4,14 @@ var fs = require('fs');
44var p12ToPem = require ( 'p12-to-pem' ) ;
55
66var GAPI = function ( options , callback ) {
7- this . token = null ;
8- this . token_expires = null ;
7+ this . token = null ;
8+ this . token_expires = null ;
99
10- this . iss = options . iss ;
11- this . scope = options . scope ;
12- this . sub = options . sub ;
13- this . prn = options . prn ;
14-
10+ this . iss = options . iss ;
11+ this . scope = options . scope ;
12+ this . sub = options . sub ;
13+ this . prn = options . prn ;
14+
1515 if ( options . keyFile ) {
1616 var self = this ;
1717 process . nextTick ( function ( ) {
@@ -30,11 +30,11 @@ var GAPI = function(options, callback) {
3030} ;
3131
3232GAPI . prototype . getToken = function ( callback ) {
33- if ( this . token && this . token_expires && ( new Date ( ) ) . getTime ( ) < this . token_expires * 1000 ) {
33+ if ( this . token && this . token_expires && ( new Date ( ) ) . getTime ( ) < this . token_expires * 1000 ) {
3434 callback ( null , this . token ) ;
3535 } else {
3636 this . getAccessToken ( callback ) ;
37- }
37+ }
3838} ;
3939
4040GAPI . prototype . getAccessToken = function ( callback ) {
@@ -48,11 +48,11 @@ GAPI.prototype.getAccessToken = function(callback) {
4848 iat : iat
4949 } ;
5050
51- if ( this . sub )
52- payload . sub = this . sub ;
51+ if ( this . sub )
52+ payload . sub = this . sub ;
5353
54- if ( this . prn )
55- payload . prn = this . prn ;
54+ if ( this . prn )
55+ payload . prn = this . prn ;
5656
5757 var signedJWT = jws . sign ( {
5858 header : { alg : 'RS256' , typ : 'JWT' } ,
@@ -101,7 +101,7 @@ GAPI.prototype.getAccessToken = function(callback) {
101101 } ) ;
102102
103103 post_req . write ( post_data ) ;
104- post_req . end ( ) ;
104+ post_req . end ( ) ;
105105} ;
106106
107107// Takes either a raw, unprotected key or a password-protected PKCS12 file
0 commit comments