OAuthRedirectHandler

Trait OAuthRedirectHandler 

Source
pub trait OAuthRedirectHandler: Send + Sync {
    // Required methods
    fn initiate_redirect(&self, request: OAuthRequest) -> AuthResult<()>;
    fn complete_redirect(&self) -> AuthResult<Option<AuthCredential>>;
}
Expand description

Handles OAuth redirect-based flows.

Redirect flows require two phases:

  1. Call initiate_redirect before leaving the current context.
  2. After the application reloads/returns, call complete_redirect to resolve the awaited credential.

Required Methods§

Implementors§