pub struct AuthClient {
pub api_url: String,
pub client_id: String,
/* private fields */
}Fields§
§api_url: String§client_id: StringImplementations§
Source§impl AuthClient
impl AuthClient
pub fn new(api_url: &str, client_id: &str) -> Self
Sourcepub async fn get_expires_at(&self) -> Result<u64, Box<dyn Error + Send + Sync>>
pub async fn get_expires_at(&self) -> Result<u64, Box<dyn Error + Send + Sync>>
Get the expiration time of the user refresh token or DDS access token
pub async fn sign_in_with_app_credentials( &mut self, app_key: &str, app_secret: &str, ) -> Result<String, Box<dyn Error + Send + Sync>>
pub async fn get_dds_access_token( &self, oidc_access_token: Option<&str>, ) -> Result<String, Box<dyn Error + Send + Sync>>
pub async fn user_login( &mut self, email: &str, password: &str, ) -> Result<String, Box<dyn Error + Send + Sync>>
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