Struct ic_auth_client::AuthClient
source · pub struct AuthClient {
pub idle_manager: Option<IdleManager>,
/* private fields */
}Expand description
The tool for managing authentication and identity. It maintains the state of the user’s identity and provides methods for authentication.
Fields§
§idle_manager: Option<IdleManager>The idle manager that handles idle timeouts.
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() -> Self
pub async fn new() -> Self
Creates a new AuthClient with default options.
sourcepub async fn new_with_options(options: AuthClientCreateOptions) -> Self
pub async fn new_with_options(options: AuthClientCreateOptions) -> Self
Creates a new AuthClient with the provided options.
sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Checks if the user is authenticated.
sourcepub async fn login_with_options(&mut self, options: AuthClientLoginOptions)
pub async fn login_with_options(&mut 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 copy 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)