pub struct NativeAuthClient(/* private fields */);Available on crate feature
native 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 NativeAuthClient
impl NativeAuthClient
Sourcepub fn new<T: AsRef<str>>(service_name: T) -> Result<Self, AuthClientError>
Available on crate feature keyring only.
pub fn new<T: AsRef<str>>(service_name: T) -> Result<Self, AuthClientError>
keyring only.Creates a new [AuthClient] with default options.
Sourcepub fn new_with_pem_directory<T, P>(
service_name: T,
directory: P,
) -> Result<Self, AuthClientError>
Available on crate feature pem only.
pub fn new_with_pem_directory<T, P>( service_name: T, directory: P, ) -> Result<Self, AuthClientError>
pem only.Creates a new [AuthClient] using the first PEM file found inside the provided directory.
Sourcepub fn new_with_options(
options: NativeAuthClientCreateOptions,
) -> Result<Self, AuthClientError>
pub fn new_with_options( options: NativeAuthClientCreateOptions, ) -> Result<Self, AuthClientError>
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 idle_manager(&self) -> Option<IdleManager>
pub fn idle_manager(&self) -> Option<IdleManager>
Returns the idle manager if it exists.
Trait Implementations§
Source§impl Clone for NativeAuthClient
impl Clone for NativeAuthClient
Source§fn clone(&self) -> NativeAuthClient
fn clone(&self) -> NativeAuthClient
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 NativeAuthClient
impl !RefUnwindSafe for NativeAuthClient
impl Send for NativeAuthClient
impl Sync for NativeAuthClient
impl Unpin for NativeAuthClient
impl !UnwindSafe for NativeAuthClient
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