pub enum ClientMode {
Live,
Emulator {
host: String,
},
}Expand description
Selects whether an crate::auth::AuthClient talks to production
Firebase or a local emulator instance.
Variants§
Live
Talk to production Firebase Authentication.
Emulator
Talk to a local Firebase Auth Emulator at host (e.g. localhost:9099).
Implementations§
Source§impl ClientMode
impl ClientMode
Sourcepub fn resolve(explicit_emulator_host: Option<String>) -> Self
pub fn resolve(explicit_emulator_host: Option<String>) -> Self
Resolves the mode to use: an explicitly-requested emulator host takes
priority, then the FIREBASE_AUTH_EMULATOR_HOST environment variable,
and otherwise ClientMode::Live.
Sourcepub fn endpoints(&self) -> IdentityToolkitEndpoints
pub fn endpoints(&self) -> IdentityToolkitEndpoints
Builds the Identity Toolkit endpoint set for this mode.
Sourcepub fn requires_bearer_token(&self) -> bool
pub fn requires_bearer_token(&self) -> bool
Whether requests in this mode require an OAuth2 bearer token.
The Firebase Auth Emulator does not enforce authentication.
Trait Implementations§
Source§impl Clone for ClientMode
impl Clone for ClientMode
Source§fn clone(&self) -> ClientMode
fn clone(&self) -> ClientMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClientMode
impl RefUnwindSafe for ClientMode
impl Send for ClientMode
impl Sync for ClientMode
impl Unpin for ClientMode
impl UnsafeUnpin for ClientMode
impl UnwindSafe for ClientMode
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