pub struct AuthClient(/* private fields */);Available on crate feature
wasm-js only.Expand description
The tool for managing authentication and identity.
It maintains the state of the user’s identity and provides methods for authentication.
Implementations§
Source§impl AuthClient
impl AuthClient
Sourcepub fn builder() -> AuthClientBuilder
pub fn builder() -> AuthClientBuilder
Create a new [AuthClientBuilder] for building an AuthClient.
Sourcepub async fn new() -> Result<Self, AuthClientError>
pub async fn new() -> Result<Self, AuthClientError>
Creates a new AuthClient with default options.
Sourcepub async fn new_with_options(
options: AuthClientCreateOptions,
) -> Result<Self, AuthClientError>
pub async fn new_with_options( options: AuthClientCreateOptions, ) -> Result<Self, AuthClientError>
Creates a new AuthClient with the provided options.
Sourcepub fn idle_manager(&self) -> Option<IdleManager>
pub fn idle_manager(&self) -> Option<IdleManager>
Returns the idle manager if it exists.
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Checks if the user is authenticated.
Sourcepub fn login_with_options(&self, options: AuthClientLoginOptions)
pub fn login_with_options(&self, options: AuthClientLoginOptions)
Logs the user in with the provided options.
Trait Implementations§
Source§impl Clone for AuthClient
impl Clone for AuthClient
Source§fn clone(&self) -> AuthClient
fn clone(&self) -> AuthClient
Returns a duplicate of the value. Read more
1.0.0 · 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 AuthClient
impl !RefUnwindSafe for AuthClient
impl Send for AuthClient
impl Sync for AuthClient
impl Unpin for AuthClient
impl !UnwindSafe for AuthClient
Blanket Implementations§
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