Beispiel #1
0
            public static TestConfig ForFirebaseAuth()
            {
                var authBuilder = new AuthBuilder
                {
                    Signer = JwtTestUtils.DefaultSigner,
                };
                var tokenVerifier = CustomTokenVerifier.ForServiceAccount(
                    JwtTestUtils.DefaultClientEmail, JwtTestUtils.DefaultPublicKey);

                return(new TestConfig(authBuilder, tokenVerifier));
            }
Beispiel #2
0
            internal TestConfig WithEmulator()
            {
                var authBuilder = new AuthBuilder
                {
                    TenantId     = this.TenantId,
                    EmulatorHost = "localhost:9090",
                };
                var tokenVerifier = CustomTokenVerifier.ForEmulator(this.TenantId);

                return(new TestConfig(authBuilder, tokenVerifier));
            }
Beispiel #3
0
            public static TestConfig ForTenantAwareFirebaseAuth(string tenantId)
            {
                var authBuilder = new AuthBuilder
                {
                    TenantId = tenantId,
                    Signer   = JwtTestUtils.DefaultSigner,
                };
                var tokenVerifier = CustomTokenVerifier.ForServiceAccount(
                    JwtTestUtils.DefaultClientEmail, JwtTestUtils.DefaultPublicKey, tenantId);

                return(new TestConfig(authBuilder, tokenVerifier));
            }
Beispiel #4
0
 private TestConfig(AuthBuilder authBuilder, CustomTokenVerifier tokenVerifier)
 {
     this.authBuilder   = authBuilder;
     this.tokenVerifier = tokenVerifier;
 }