Skip to content

Commit 5d3597a

Browse files
committed
Fixed copyright years
1 parent 27e0e6f commit 5d3597a

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/auth/token-verifier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Copyright 2021 Google Inc.
2+
* Copyright 2018 Google Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/utils/token-verifier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Copyright 2018 Google Inc.
2+
* Copyright 2021 Google Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

test/unit/auth/token-verifier.spec.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import LegacyFirebaseTokenGenerator = require('firebase-token-generator');
3030
import * as mocks from '../../resources/mocks';
3131
import { FirebaseTokenGenerator, ServiceAccountSigner } from '../../../src/auth/token-generator';
3232
import * as verifier from '../../../src/utils/token-verifier';
33-
import * as verifierUtil from '../../../src/auth/token-verifier';
33+
import * as verifierAuth from '../../../src/auth/token-verifier';
3434

3535
import { ServiceAccountCredential } from '../../../src/credential/credential-internal';
3636
import { FirebaseAuthError } from '../../../src/utils/error';
@@ -115,7 +115,7 @@ function createTokenVerifier(
115115
'https://www.googleapis.com/robot/v1/metadata/x509/[email protected]',
116116
algorithm,
117117
'https://securetoken.google.com/',
118-
verifierUtil.ID_TOKEN_INFO,
118+
verifierAuth.ID_TOKEN_INFO,
119119
app
120120
);
121121
}
@@ -160,7 +160,7 @@ describe('FirebaseTokenVerifier', () => {
160160
verifyApiName: 'verifyToken()',
161161
jwtName: 'Important Token',
162162
shortName: 'token',
163-
errorCodeConfig: verifierUtil.ID_TOKEN_ERROR_CODE_CONFIG,
163+
errorCodeConfig: verifierAuth.ID_TOKEN_ERROR_CODE_CONFIG,
164164
errorType: FirebaseAuthError,
165165
},
166166
app,
@@ -176,7 +176,7 @@ describe('FirebaseTokenVerifier', () => {
176176
invalidCertUrl as any,
177177
'RS256',
178178
'https://www.example.com/issuer/',
179-
verifierUtil.ID_TOKEN_INFO,
179+
verifierAuth.ID_TOKEN_INFO,
180180
app,
181181
);
182182
}).to.throw('The provided public client certificate URL is an invalid URL.');
@@ -191,7 +191,7 @@ describe('FirebaseTokenVerifier', () => {
191191
'https://www.example.com/publicKeys',
192192
invalidAlgorithm as any,
193193
'https://www.example.com/issuer/',
194-
verifierUtil.ID_TOKEN_INFO,
194+
verifierAuth.ID_TOKEN_INFO,
195195
app);
196196
}).to.throw('The provided JWT algorithm is an empty string.');
197197
});
@@ -205,7 +205,7 @@ describe('FirebaseTokenVerifier', () => {
205205
'https://www.example.com/publicKeys',
206206
'RS256',
207207
invalidIssuer as any,
208-
verifierUtil.ID_TOKEN_INFO,
208+
verifierAuth.ID_TOKEN_INFO,
209209
app,
210210
);
211211
}).to.throw('The provided JWT issuer is an invalid URL.');
@@ -225,7 +225,7 @@ describe('FirebaseTokenVerifier', () => {
225225
verifyApiName: invalidVerifyApiName as any,
226226
jwtName: 'Important Token',
227227
shortName: 'token',
228-
errorCodeConfig: verifierUtil.ID_TOKEN_ERROR_CODE_CONFIG,
228+
errorCodeConfig: verifierAuth.ID_TOKEN_ERROR_CODE_CONFIG,
229229
errorType: FirebaseAuthError,
230230
},
231231
app,
@@ -247,7 +247,7 @@ describe('FirebaseTokenVerifier', () => {
247247
verifyApiName: 'verifyToken()',
248248
jwtName: invalidJwtName as any,
249249
shortName: 'token',
250-
errorCodeConfig: verifierUtil.ID_TOKEN_ERROR_CODE_CONFIG,
250+
errorCodeConfig: verifierAuth.ID_TOKEN_ERROR_CODE_CONFIG,
251251
errorType: FirebaseAuthError,
252252
},
253253
app,
@@ -269,7 +269,7 @@ describe('FirebaseTokenVerifier', () => {
269269
verifyApiName: 'verifyToken()',
270270
jwtName: 'Important Token',
271271
shortName: invalidShortName as any,
272-
errorCodeConfig: verifierUtil.ID_TOKEN_ERROR_CODE_CONFIG,
272+
errorCodeConfig: verifierAuth.ID_TOKEN_ERROR_CODE_CONFIG,
273273
errorType: FirebaseAuthError,
274274
},
275275
app,
@@ -291,7 +291,7 @@ describe('FirebaseTokenVerifier', () => {
291291
verifyApiName: 'verifyToken()',
292292
jwtName: 'Important Token',
293293
shortName: 'token',
294-
errorCodeConfig: verifierUtil.ID_TOKEN_ERROR_CODE_CONFIG,
294+
errorCodeConfig: verifierAuth.ID_TOKEN_ERROR_CODE_CONFIG,
295295
errorType: invalidErrorCodeTypes as any,
296296
},
297297
app,
@@ -339,7 +339,7 @@ describe('FirebaseTokenVerifier', () => {
339339

340340
it('should throw with the correct error type and code set in token info', () => {
341341
const errorType = FirebaseAuthError;
342-
const errorCodeConfig = verifierUtil.ID_TOKEN_ERROR_CODE_CONFIG;
342+
const errorCodeConfig = verifierAuth.ID_TOKEN_ERROR_CODE_CONFIG;
343343
const tokenVerifier = new verifier.FirebaseTokenVerifier(
344344
'https://www.example.com/publicKeys',
345345
'RS256',
@@ -383,7 +383,7 @@ describe('FirebaseTokenVerifier', () => {
383383
'https://www.googleapis.com/robot/v1/metadata/x509/[email protected]',
384384
'RS256',
385385
'https://securetoken.google.com/',
386-
verifierUtil.ID_TOKEN_INFO,
386+
verifierAuth.ID_TOKEN_INFO,
387387
mocks.mockCredentialApp(),
388388
);
389389
const mockIdToken = mocks.generateIdToken();
@@ -490,7 +490,7 @@ describe('FirebaseTokenVerifier', () => {
490490
'https://www.googleapis.com/identitytoolkit/v3/relyingparty/publicKeys',
491491
'RS256',
492492
'https://session.firebase.google.com/',
493-
verifierUtil.SESSION_COOKIE_INFO,
493+
verifierAuth.SESSION_COOKIE_INFO,
494494
app,
495495
);
496496
mockedRequests.push(mockFetchPublicKeys('/identitytoolkit/v3/relyingparty/publicKeys'));
@@ -535,7 +535,7 @@ describe('FirebaseTokenVerifier', () => {
535535
'https://www.googleapis.com/identitytoolkit/v3/relyingparty/publicKeys',
536536
'RS256',
537537
'https://session.firebase.google.com/',
538-
verifierUtil.SESSION_COOKIE_INFO,
538+
verifierAuth.SESSION_COOKIE_INFO,
539539
app,
540540
);
541541
return tokenGenerator.createCustomToken(mocks.uid)
@@ -561,7 +561,7 @@ describe('FirebaseTokenVerifier', () => {
561561
'https://www.googleapis.com/identitytoolkit/v3/relyingparty/publicKeys',
562562
'RS256',
563563
'https://session.firebase.google.com/',
564-
verifierUtil.SESSION_COOKIE_INFO,
564+
verifierAuth.SESSION_COOKIE_INFO,
565565
app,
566566
);
567567
const legacyTokenGenerator = new LegacyFirebaseTokenGenerator('foo');
@@ -654,7 +654,7 @@ describe('FirebaseTokenVerifier', () => {
654654
'https://www.googleapis.com/robot/v1/metadata/x509/[email protected]',
655655
'RS256',
656656
'https://securetoken.google.com/',
657-
verifierUtil.ID_TOKEN_INFO,
657+
verifierAuth.ID_TOKEN_INFO,
658658
appWithAgent,
659659
);
660660
mockedRequests.push(mockFetchPublicKeys());
@@ -677,7 +677,7 @@ describe('FirebaseTokenVerifier', () => {
677677
'https://www.googleapis.com/robot/v1/metadata/x509/[email protected]',
678678
'RS256',
679679
'https://securetoken.google.com/',
680-
verifierUtil.ID_TOKEN_INFO,
680+
verifierAuth.ID_TOKEN_INFO,
681681
app,
682682
);
683683
expect(https.request).not.to.have.been.called;

0 commit comments

Comments
 (0)