Skip to content

Commit 5b2b2fc

Browse files
committed
[Style] Replace some tabs with spaces for consistent indentation.
1 parent a4bf34b commit 5b2b2fc

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Node.js module for Google API service account authorization (Server to Server fl
66
Installation
77
------------
88

9-
npm install gapitoken
10-
9+
npm install gapitoken
10+
1111
Usage
1212
-----
1313

gapitoken.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ var fs = require('fs');
44
var p12ToPem = require('p12-to-pem');
55

66
var 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

3232
GAPI.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

4040
GAPI.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

Comments
 (0)