@@ -28,7 +28,7 @@ public class SessionCookieVerificationTest
28
28
public static readonly IEnumerable < object [ ] > TestConfigs = new List < object [ ] > ( )
29
29
{
30
30
new object [ ] { TestConfig . ForFirebaseAuth ( ) } ,
31
- new object [ ] { TestConfig . ForTenantAwareFirebaseAuth ( "test- tenant" ) } ,
31
+ // TODO(hkj): Add tenant-aware tests when the support is available.
32
32
} ;
33
33
34
34
private const long ClockSkewSeconds = 5 * 60 ;
@@ -234,7 +234,7 @@ public async Task InvalidIssuer(TestConfig config)
234
234
[ MemberData ( nameof ( TestConfigs ) ) ]
235
235
public async Task IdToken ( TestConfig config )
236
236
{
237
- var tokenBuilder = JwtTestUtils . IdTokenBuilder ( config . TenantId ) ;
237
+ var tokenBuilder = JwtTestUtils . IdTokenBuilder ( ) ;
238
238
var idToken = await tokenBuilder . CreateTokenAsync ( ) ;
239
239
var auth = config . CreateAuth ( ) ;
240
240
@@ -330,7 +330,7 @@ public async Task RevokedToken(TestConfig config)
330
330
var expectedMessage = "Firebase session cookie has been revoked." ;
331
331
this . CheckException ( exception , expectedMessage , AuthErrorCode . RevokedSessionCookie ) ;
332
332
Assert . Equal ( 1 , handler . Calls ) ;
333
- JwtTestUtils . AssertRevocationCheckRequest ( config . TenantId , handler . Requests [ 0 ] . Url ) ;
333
+ JwtTestUtils . AssertRevocationCheckRequest ( null , handler . Requests [ 0 ] . Url ) ;
334
334
}
335
335
336
336
[ Theory ]
@@ -354,7 +354,7 @@ public async Task ValidUnrevokedToken(TestConfig config)
354
354
355
355
Assert . Equal ( "testuser" , decoded . Uid ) ;
356
356
Assert . Equal ( 1 , handler . Calls ) ;
357
- JwtTestUtils . AssertRevocationCheckRequest ( config . TenantId , handler . Requests [ 0 ] . Url ) ;
357
+ JwtTestUtils . AssertRevocationCheckRequest ( null , handler . Requests [ 0 ] . Url ) ;
358
358
}
359
359
360
360
[ Theory ]
@@ -380,7 +380,7 @@ public async Task CheckRevokedError(TestConfig config)
380
380
Assert . Null ( exception . InnerException ) ;
381
381
Assert . NotNull ( exception . HttpResponse ) ;
382
382
Assert . Equal ( 1 , handler . Calls ) ;
383
- JwtTestUtils . AssertRevocationCheckRequest ( config . TenantId , handler . Requests [ 0 ] . Url ) ;
383
+ JwtTestUtils . AssertRevocationCheckRequest ( null , handler . Requests [ 0 ] . Url ) ;
384
384
}
385
385
386
386
[ Theory ]
@@ -423,32 +423,25 @@ public class TestConfig
423
423
private readonly AuthBuilder authBuilder ;
424
424
private readonly MockTokenBuilder tokenBuilder ;
425
425
426
- private TestConfig ( string tenantId = null )
426
+ private TestConfig ( )
427
427
{
428
- this . authBuilder = JwtTestUtils . AuthBuilderForTokenVerification ( tenantId ) ;
429
- this . tokenBuilder = JwtTestUtils . SessionCookieBuilder ( tenantId ) ;
428
+ this . authBuilder = JwtTestUtils . AuthBuilderForTokenVerification ( ) ;
429
+ this . tokenBuilder = JwtTestUtils . SessionCookieBuilder ( ) ;
430
430
}
431
431
432
- public string TenantId => this . authBuilder . TenantId ;
433
-
434
432
public static TestConfig ForFirebaseAuth ( )
435
433
{
436
434
return new TestConfig ( ) ;
437
435
}
438
436
439
- public static TestConfig ForTenantAwareFirebaseAuth ( string tenantId )
440
- {
441
- return new TestConfig ( tenantId ) ;
442
- }
443
-
444
- public AbstractFirebaseAuth CreateAuth ( HttpMessageHandler handler = null )
437
+ public FirebaseAuth CreateAuth ( HttpMessageHandler handler = null )
445
438
{
446
439
var options = new TestOptions
447
440
{
448
441
UserManagerRequestHandler = handler ,
449
442
SessionCookieVerifier = true ,
450
443
} ;
451
- return this . authBuilder . Build ( options ) ;
444
+ return ( FirebaseAuth ) this . authBuilder . Build ( options ) ;
452
445
}
453
446
454
447
public async Task < string > CreateSessionCookieAsync (
0 commit comments