pub struct OAuth2Method { /* private fields */ }Expand description
OAuth 2.0 authentication method.
Implementations§
Source§impl OAuth2Method
impl OAuth2Method
Sourcepub fn provider(self, provider: OAuthProvider) -> Self
pub fn provider(self, provider: OAuthProvider) -> Self
Set the OAuth provider.
Sourcepub fn client_secret(self, client_secret: impl Into<String>) -> Self
pub fn client_secret(self, client_secret: impl Into<String>) -> Self
Set the client secret.
Sourcepub fn redirect_uri(self, redirect_uri: impl Into<String>) -> Self
pub fn redirect_uri(self, redirect_uri: impl Into<String>) -> Self
Set the redirect URI.
Generate authorization URL.
Trait Implementations§
Source§impl AuthMethod for OAuth2Method
impl AuthMethod for OAuth2Method
Source§fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
credential: &'life1 Credential,
_metadata: &'life2 CredentialMetadata,
) -> Pin<Box<dyn Future<Output = Result<MethodResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
credential: &'life1 Credential,
_metadata: &'life2 CredentialMetadata,
) -> Pin<Box<dyn Future<Output = Result<MethodResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Authenticate using the provided credentials.
Source§fn validate_config(&self) -> Result<()>
fn validate_config(&self) -> Result<()>
Validate configuration for this method.
Source§fn supports_refresh(&self) -> bool
fn supports_refresh(&self) -> bool
Check if this method supports refresh tokens.
Auto Trait Implementations§
impl Freeze for OAuth2Method
impl RefUnwindSafe for OAuth2Method
impl Send for OAuth2Method
impl Sync for OAuth2Method
impl Unpin for OAuth2Method
impl UnwindSafe for OAuth2Method
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