pub trait Authenticator {
// Required method
async fn get_token(&self) -> Result<String>;
}Expand description
Defines the interface for an OAuth2 authentication flow.
Implementors are responsible for performing the full token exchange and returning a raw access token string on success.
§Implementors
super::pkce::AuthorizationCodeFlow— Interactive browser login via PKCE.super::client_credentials::ClientCredentialsFlow— Machine-to-machine via client secret.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.