pub struct AuthenticationClient { /* private fields */ }
Expand description
Authentication client for handling login and getting tokens
Implementations§
Source§impl AuthenticationClient
impl AuthenticationClient
pub fn new() -> Self
pub fn new_with_base_url(base_url: String) -> Self
Sourcepub async fn login(&self, username: &str, password: &str) -> Result<Credentials>
pub async fn login(&self, username: &str, password: &str) -> Result<Credentials>
Login with username and password to get authentication tokens
Sourcepub async fn refresh_token(&self, refresh_token: &str) -> Result<Credentials>
pub async fn refresh_token(&self, refresh_token: &str) -> Result<Credentials>
Refresh access token using refresh token
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthenticationClient
impl !RefUnwindSafe for AuthenticationClient
impl Send for AuthenticationClient
impl Sync for AuthenticationClient
impl Unpin for AuthenticationClient
impl !UnwindSafe for AuthenticationClient
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