Skip to main content

aether_auth/
handler.rs

1use crate::error::OAuthError;
2use futures::future::BoxFuture;
3
4/// UI boundary for interactive OAuth authorization.
5pub trait OAuthHandler: Send + Sync {
6    /// The redirect URI the OAuth provider should send the user back to.
7    fn redirect_uri(&self) -> &str;
8
9    /// Present `auth_url` and return the absolute callback URL.
10    fn authorize(&self, auth_url: &str) -> BoxFuture<'_, Result<String, OAuthError>>;
11}