Struct rraw::auth::PasswordAuthenticator
source · pub struct PasswordAuthenticator {
pub token: Option<String>,
pub expiration_time: Option<u128>,
/* private fields */
}
Fields§
§token: Option<String>
Token
expiration_time: Option<u128>
When does it expire
Implementations§
source§impl PasswordAuthenticator
impl PasswordAuthenticator
sourcepub fn new<S: Into<String>>(
client_id: S,
client_secret: S,
username: S,
password: S
) -> PasswordAuthenticator
pub fn new<S: Into<String>>( client_id: S, client_secret: S, username: S, password: S ) -> PasswordAuthenticator
Creates a new Authenticator
Trait Implementations§
source§impl Authenticator for PasswordAuthenticator
impl Authenticator for PasswordAuthenticator
source§fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
client: &'life1 Client,
user_agent: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn login<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, client: &'life1 Client, user_agent: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Logs in
source§fn logout<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
client: &'life1 Client,
user_agent: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn logout<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, client: &'life1 Client, user_agent: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Logs out
source§fn token_refresh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
client: &'life1 Client,
user_agent: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn token_refresh<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, client: &'life1 Client, user_agent: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Returns true if successful
source§fn needs_token_refresh(&self) -> bool
fn needs_token_refresh(&self) -> bool
Validates Time
source§fn get_refresh_token(&self) -> Option<String>
fn get_refresh_token(&self) -> Option<String>
Always None
source§impl Clone for PasswordAuthenticator
impl Clone for PasswordAuthenticator
source§fn clone(&self) -> PasswordAuthenticator
fn clone(&self) -> PasswordAuthenticator
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 moresource§impl Debug for PasswordAuthenticator
impl Debug for PasswordAuthenticator
impl Authorized for PasswordAuthenticator
Auto Trait Implementations§
impl RefUnwindSafe for PasswordAuthenticator
impl Send for PasswordAuthenticator
impl Sync for PasswordAuthenticator
impl Unpin for PasswordAuthenticator
impl UnwindSafe for PasswordAuthenticator
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