Skip to main content

OAuthHandler

Trait OAuthHandler 

Source
pub trait OAuthHandler: Send + Sync {
    // Required methods
    fn redirect_uri(&self) -> &str;
    fn authorize(
        &self,
        auth_url: &str,
    ) -> BoxFuture<'_, Result<String, OAuthError>>;
}
Expand description

UI boundary for interactive OAuth authorization.

Required Methods§

Source

fn redirect_uri(&self) -> &str

The redirect URI the OAuth provider should send the user back to.

Source

fn authorize(&self, auth_url: &str) -> BoxFuture<'_, Result<String, OAuthError>>

Present auth_url and return the absolute callback URL.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§