pub trait UserInfoProvider: SimpleOAuthProvider {
// Required methods
fn user_info_url(&self) -> &str;
fn extract_user_info(&self, val: Value) -> Result<UserInfo, Error>;
// Provided method
fn user_info_headers(
&self,
_credentials: &OAuthCredentials,
) -> Vec<(String, String)> { ... }
}Expand description
Trait for OAuth providers that support fetching normalized user info.
Required Methods§
Sourcefn user_info_url(&self) -> &str
fn user_info_url(&self) -> &str
The URL to fetch the user info from the provider
Provided Methods§
Sourcefn user_info_headers(
&self,
_credentials: &OAuthCredentials,
) -> Vec<(String, String)>
fn user_info_headers( &self, _credentials: &OAuthCredentials, ) -> Vec<(String, String)>
Additional headers to send when making user info requests to the provider
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".