pub struct OAuthClient { /* private fields */ }Implementations§
Source§impl OAuthClient
impl OAuthClient
pub fn new( client_id: impl Into<String>, client_secret: OAuthClientSecret, ) -> Result<Self>
pub fn with_http_client( client_id: impl Into<String>, client_secret: OAuthClientSecret, http: Client, ) -> Result<Self>
pub fn with_endpoints(self, authorize_url: Url, token_url: Url) -> Self
pub fn client_id(&self) -> &str
pub fn token_url(&self) -> &Url
pub fn implicit_url( &self, redirect_uri: impl AsRef<str>, scopes: impl IntoIterator<Item = OAuthScope>, ) -> Result<Url>
pub fn implicit_url_with_state( &self, redirect_uri: impl AsRef<str>, scopes: impl IntoIterator<Item = OAuthScope>, state: impl Into<String>, ) -> Result<Url>
pub async fn exchange_code( &self, code: impl Into<String>, redirect_uri: impl Into<String>, ) -> Result<OAuthTokenResponse>
pub async fn refresh_access_token( &self, refresh_token: &OAuthRefreshToken, ) -> Result<OAuthTokenResponse>
Trait Implementations§
Source§impl Clone for OAuthClient
impl Clone for OAuthClient
Source§fn clone(&self) -> OAuthClient
fn clone(&self) -> OAuthClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OAuthClient
impl !RefUnwindSafe for OAuthClient
impl Send for OAuthClient
impl Sync for OAuthClient
impl Unpin for OAuthClient
impl UnsafeUnpin for OAuthClient
impl !UnwindSafe for OAuthClient
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