pub struct OAuth2 {
pub refresh_endpoint: String,
pub client_id: String,
pub client_secret: String,
pub token_type: TokenType,
pub access_token: RwLock<String>,
pub refresh_token: String,
pub callback: Option<Box<dyn Fn(RefreshData) + Send + Sync + 'static>>,
}Fields§
§refresh_endpoint: String§client_id: String§client_secret: String§token_type: TokenType§access_token: RwLock<String>§refresh_token: String§callback: Option<Box<dyn Fn(RefreshData) + Send + Sync + 'static>>Implementations§
Source§impl OAuth2
impl OAuth2
pub fn callback(&mut self, data: impl Fn(RefreshData) + Send + Sync + 'static)
pub fn make_refresh_request<'a>( &'a self, client: &'a Client, ) -> RequestBuilder<'_>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for OAuth2
impl !RefUnwindSafe for OAuth2
impl Send for OAuth2
impl Sync for OAuth2
impl Unpin for OAuth2
impl !UnwindSafe for OAuth2
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