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() -> Result<Self, DelegationError>
pub async fn new() -> Result<Self, DelegationError>
Creates a new AuthClient
with default options.
Sourcepub async fn new_with_options(
options: AuthClientCreateOptions,
) -> Result<Self, DelegationError>
pub async fn new_with_options( options: AuthClientCreateOptions, ) -> Result<Self, DelegationError>
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 fn login_with_options(&mut self, options: AuthClientLoginOptions)
pub 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 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