pub struct OAuth2Client { /* private fields */ }Expand description
Configured OAuth 2.0 client for a single provider (fixed authorization and token endpoints).
Implementations§
Source§impl OAuth2Client
impl OAuth2Client
pub fn builder( provider_id: impl Into<String>, options: ProviderOptions, ) -> OAuth2ClientBuilder
pub fn id(&self) -> &str
pub fn options(&self) -> &ProviderOptions
pub fn http(&self) -> &OAuthHttpClient
pub fn token_endpoint(&self) -> &TokenEndpoint
pub fn exchange_code( &self, code: impl Into<String>, redirect_uri: impl Into<String>, ) -> Result<ExchangeCodeBuilder<'_>, OAuthError>
pub fn refresh_token( &self, refresh_token: impl Into<String>, ) -> Result<RefreshTokenBuilder<'_>, OAuthError>
pub fn client_credentials( &self, ) -> Result<ClientCredentialsBuilder<'_>, OAuthError>
Trait Implementations§
Source§impl Clone for OAuth2Client
impl Clone for OAuth2Client
Source§fn clone(&self) -> OAuth2Client
fn clone(&self) -> OAuth2Client
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 !RefUnwindSafe for OAuth2Client
impl !UnwindSafe for OAuth2Client
impl Freeze for OAuth2Client
impl Send for OAuth2Client
impl Sync for OAuth2Client
impl Unpin for OAuth2Client
impl UnsafeUnpin for OAuth2Client
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