pub struct AuthClientBuilder { /* private fields */ }Expand description
Builds an AuthClient.
Implementations§
Source§impl AuthClientBuilder
impl AuthClientBuilder
Sourcepub fn new(project_id: impl Into<String>) -> Self
pub fn new(project_id: impl Into<String>) -> Self
Starts building a client for the given Firebase project id.
Sourcepub fn service_account_key(self, key: ServiceAccountKey) -> Self
pub fn service_account_key(self, key: ServiceAccountKey) -> Self
Authenticates using an explicit service account key.
Sourcepub fn application_default_credentials(self) -> Self
pub fn application_default_credentials(self) -> Self
Authenticates using Application Default Credentials, resolved on
first use: the GOOGLE_APPLICATION_CREDENTIALS environment
variable, gcloud user credentials, or the GCE/Cloud Run metadata
server, in that order (see gcp_auth::provider).
Sourcepub fn use_emulator(self, host: impl Into<String>) -> Self
pub fn use_emulator(self, host: impl Into<String>) -> Self
Targets a Firebase Auth Emulator at host (e.g. localhost:9099)
instead of production Firebase.
If not called, the client still auto-detects the
FIREBASE_AUTH_EMULATOR_HOST environment variable in Self::build.
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Supplies a custom reqwest::Client, e.g. for testing.
Sourcepub fn build(self) -> Result<AuthClient, AuthError>
pub fn build(self) -> Result<AuthClient, AuthError>
Builds the AuthClient.
Auto Trait Implementations§
impl !RefUnwindSafe for AuthClientBuilder
impl !UnwindSafe for AuthClientBuilder
impl Freeze for AuthClientBuilder
impl Send for AuthClientBuilder
impl Sync for AuthClientBuilder
impl Unpin for AuthClientBuilder
impl UnsafeUnpin for AuthClientBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more