pub struct OAuthClient { /* private fields */ }Expand description
Talks to an OAuth 2.0 server: discovery, code exchange and refresh.
It sends on any HttpClient. With the reqwest feature, Default builds it over
the one the SDK ships, so an application need not depend on reqwest itself;
new is for one that has a client of its own to share.
Implementations§
Source§impl OAuthClient
impl OAuthClient
Sourcepub fn new(http: impl HttpClient + 'static) -> OAuthClient
pub fn new(http: impl HttpClient + 'static) -> OAuthClient
A client that sends on http.
Sourcepub async fn discover(&self, base_url: &str) -> Result<ServerMetadata, Error>
pub async fn discover(&self, base_url: &str) -> Result<ServerMetadata, Error>
What the server under base_url publishes at its well-known endpoint. HEY publishes
nothing there; ServerMetadata::for_hey is its answer.
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 moreSource§impl Debug for OAuthClient
impl Debug for OAuthClient
Source§impl Default for OAuthClient
Available on crate feature reqwest only.
impl Default for OAuthClient
Available on crate feature
reqwest only.Source§fn default() -> OAuthClient
fn default() -> OAuthClient
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for OAuthClient
impl !UnwindSafe for OAuthClient
impl Freeze for OAuthClient
impl Send for OAuthClient
impl Sync for OAuthClient
impl Unpin for OAuthClient
impl UnsafeUnpin 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