pub struct OAuthConfig {
pub provider: String,
pub client_id: String,
pub client_secret: String,
pub redirect_uri: String,
}Fields§
§provider: String§client_id: String§client_secret: String§redirect_uri: StringImplementations§
Source§impl OAuthConfig
impl OAuthConfig
Sourcepub fn auth_url(&self) -> String
pub fn auth_url(&self) -> String
Generate the authorization URL for the provider.
Callers MUST append a &state=<random> parameter and validate it in the
callback to prevent CSRF attacks. See OAuthStateStore for a minimal
implementation.
Sourcepub fn auth_url_with_state(&self, state: &str) -> String
pub fn auth_url_with_state(&self, state: &str) -> String
Generate the authorization URL with a CSRF state parameter attached.
Sourcepub fn userinfo_url(&self) -> &str
pub fn userinfo_url(&self) -> &str
URL for the userinfo endpoint, which returns the authenticated user’s profile.
Trait Implementations§
Source§impl Clone for OAuthConfig
impl Clone for OAuthConfig
Source§fn clone(&self) -> OAuthConfig
fn clone(&self) -> OAuthConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OAuthConfig
impl Debug for OAuthConfig
Source§impl<'de> Deserialize<'de> for OAuthConfig
impl<'de> Deserialize<'de> for OAuthConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OAuthConfig
impl RefUnwindSafe for OAuthConfig
impl Send for OAuthConfig
impl Sync for OAuthConfig
impl Unpin for OAuthConfig
impl UnsafeUnpin for OAuthConfig
impl UnwindSafe for OAuthConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more