internal static FirebaseTokenVerifier CreateIDTokenVerifier(FirebaseApp app) { var projectId = app.GetProjectId(); if (string.IsNullOrEmpty(projectId)) { throw new ArgumentException( "Must initialize FirebaseApp with a project ID to verify ID tokens."); } var keySource = new HttpPublicKeySource( IdTokenCertUrl, SystemClock.Default, app.Options.HttpClientFactory); var args = new FirebaseTokenVerifierArgs() { ProjectId = projectId, ShortName = "ID token", Operation = "VerifyIdTokenAsync()", Url = "https://firebase.google.com/docs/auth/admin/verify-id-tokens", Issuer = "https://securetoken.google.com/", Clock = SystemClock.Default, PublicKeySource = keySource, }; return(new FirebaseTokenVerifier(args)); }
private FirebaseMessaging(FirebaseApp app) { this.messagingClient = new FirebaseMessagingClient( app.Options.HttpClientFactory, app.Options.Credential, app.GetProjectId()); this.instanceIdClient = new InstanceIdClient( app.Options.HttpClientFactory, app.Options.Credential); }
public static FirebaseUserManager Create(FirebaseApp app) { var args = new FirebaseUserManagerArgs { ClientFactory = app.Options.HttpClientFactory, Credential = app.Options.Credential, ProjectId = app.GetProjectId(), }; return(new FirebaseUserManager(args)); }
internal static FirebaseUserManager Create(FirebaseApp app) { var args = new Args { ClientFactory = app.Options.HttpClientFactory, Credential = app.Options.Credential, ProjectId = app.GetProjectId(), RetryOptions = RetryOptions.Default, }; return(new FirebaseUserManager(args)); }
internal static ProviderConfigManager Create(FirebaseApp app, string tenantId = null) { var args = new Args { ClientFactory = app.Options.HttpClientFactory, Credential = app.Options.Credential, ProjectId = app.GetProjectId(), RetryOptions = RetryOptions.Default, TenantId = tenantId, }; return(new ProviderConfigManager(args)); }
internal static FirebaseUserManager Create(FirebaseApp app, string tenantId = null) { var args = new Args { ClientFactory = app.Options.HttpClientFactory, Credential = app.Options.Credential, ProjectId = app.GetProjectId(), TenantId = tenantId, RetryOptions = RetryOptions.Default, EmulatorHost = Utils.EmulatorHostFromEnvironment, }; return(new FirebaseUserManager(args)); }
internal static TenantManager Create(FirebaseApp app) { var args = new Args { App = app, ClientFactory = app.Options.HttpClientFactory, Credential = app.Options.Credential, ProjectId = app.GetProjectId(), EmulatorHost = Utils.EmulatorHostFromEnvironment, RetryOptions = RetryOptions.Default, }; return(new TenantManager(args)); }
internal static FirebaseTokenVerifier CreateSessionCookieVerifier(FirebaseApp app) { var projectId = app.GetProjectId(); if (string.IsNullOrEmpty(projectId)) { throw new ArgumentException( "Must initialize FirebaseApp with a project ID to verify session cookies."); } var keySource = new HttpPublicKeySource( SessionCookieCertUrl, SystemClock.Default, app.Options.HttpClientFactory); return(CreateSessionCookieVerifier(projectId, keySource)); }
internal static FirebaseTokenVerifier CreateIDTokenVerifier(FirebaseApp app) { var projectId = app.GetProjectId(); if (string.IsNullOrEmpty(projectId)) { throw new ArgumentException( "Must initialize FirebaseApp with a project ID to verify ID tokens."); } var keySource = new HttpPublicKeySource( IdTokenCertUrl, SystemClock.Default, app.Options.HttpClientFactory); var args = FirebaseTokenVerifierArgs.ForIdTokens(projectId, keySource); return(new FirebaseTokenVerifier(args)); }
internal static FirebaseUserManager Create(FirebaseApp app) { var projectId = app.GetProjectId(); if (string.IsNullOrEmpty(projectId)) { throw new ArgumentException( "Must initialize FirebaseApp with a project ID to manage users."); } var args = new FirebaseUserManagerArgs { ClientFactory = new HttpClientFactory(), Credential = app.Options.Credential, ProjectId = projectId, }; return(new FirebaseUserManager(args)); }
internal static FirebaseTokenVerifier CreateIdTokenVerifier( FirebaseApp app, string tenantId = null) { var projectId = app.GetProjectId(); if (string.IsNullOrEmpty(projectId)) { throw new ArgumentException( "Must initialize FirebaseApp with a project ID to verify ID tokens."); } var keySource = new HttpPublicKeySource( IdTokenCertUrl, SystemClock.Default, app.Options.HttpClientFactory); var args = CreateIdTokenVerifierArgs(); args.ProjectId = projectId; args.TenantId = tenantId; args.PublicKeySource = keySource; args.IsEmulatorMode = Utils.IsEmulatorModeFromEnvironment; return(new FirebaseTokenVerifier(args)); }
private FirebaseMessaging(FirebaseApp app) { this.messagingClient = new FirebaseMessagingClient( new HttpClientFactory(), app.Options.Credential, app.GetProjectId()); }