pub struct OAuthConfig {
pub client_id: String,
pub client_secret: String,
pub redirect_uri: String,
pub scopes: Vec<OAuthScope>,
}Expand description
OAuth 2.0 configuration.
Fields§
§client_id: StringClient ID.
client_secret: StringClient secret.
redirect_uri: StringRedirect URI.
scopes: Vec<OAuthScope>Requested scopes.
Implementations§
Source§impl OAuthConfig
impl OAuthConfig
Sourcepub fn new(
client_id: &str,
client_secret: &str,
redirect_uri: &str,
) -> OAuthConfig
pub fn new( client_id: &str, client_secret: &str, redirect_uri: &str, ) -> OAuthConfig
Create new OAuth configuration.
Sourcepub fn scope(self, scope: OAuthScope) -> OAuthConfig
pub fn scope(self, scope: OAuthScope) -> OAuthConfig
Add a scope.
Sourcepub fn scopes(self, scopes: Vec<OAuthScope>) -> OAuthConfig
pub fn scopes(self, scopes: Vec<OAuthScope>) -> OAuthConfig
Add multiple scopes.
Generate authorization URL.
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OAuthConfig
impl RefUnwindSafe for OAuthConfig
impl Send for OAuthConfig
impl Sync for OAuthConfig
impl Unpin 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