pub struct WebFlowAuth { /* private fields */ }Expand description
Web Server OAuth flow for web applications.
Implementations§
Source§impl WebFlowAuth
impl WebFlowAuth
Sourcepub fn new(config: OAuthConfig) -> Result<Self>
pub fn new(config: OAuthConfig) -> Result<Self>
Create a new web flow authenticator.
Generate the authorization URL to redirect users to.
Sourcepub async fn exchange_code(
&self,
code: &str,
login_url: &str,
) -> Result<TokenResponse>
pub async fn exchange_code( &self, code: &str, login_url: &str, ) -> Result<TokenResponse>
Exchange an authorization code for tokens.
The code parameter is not logged to prevent credential exposure.
Trait Implementations§
Source§impl Clone for WebFlowAuth
impl Clone for WebFlowAuth
Source§fn clone(&self) -> WebFlowAuth
fn clone(&self) -> WebFlowAuth
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for WebFlowAuth
impl !RefUnwindSafe for WebFlowAuth
impl Send for WebFlowAuth
impl Sync for WebFlowAuth
impl Unpin for WebFlowAuth
impl !UnwindSafe for WebFlowAuth
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