pub struct GenericOAuthProvider { /* private fields */ }Expand description
Social provider implementation used by the generic OAuth plugin.
SocialOAuthProvider::create_authorization_url is synchronous, so providers that only
define discovery_url cannot resolve their authorization endpoint through this trait method.
Use the plugin routes (/sign-in/oauth2, /oauth2/callback/:providerId, /oauth2/link) as
the canonical flow for discovery-only generic providers.
Implementations§
Source§impl GenericOAuthProvider
impl GenericOAuthProvider
pub fn new(config: GenericOAuthConfig) -> Self
pub fn config(&self) -> &GenericOAuthConfig
pub fn refresh_access_token_request( &self, refresh_token: impl Into<String>, ) -> Result<OAuthFormRequest, OAuthError>
Trait Implementations§
Source§impl Clone for GenericOAuthProvider
impl Clone for GenericOAuthProvider
Source§fn clone(&self) -> GenericOAuthProvider
fn clone(&self) -> GenericOAuthProvider
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 GenericOAuthProvider
impl Debug for GenericOAuthProvider
Source§impl SocialOAuthProvider for GenericOAuthProvider
impl SocialOAuthProvider for GenericOAuthProvider
fn id(&self) -> &str
fn name(&self) -> &str
fn provider_options(&self) -> ProviderOptions
fn get_user_info( &self, tokens: OAuth2Tokens, _provider_user: Option<Value>, ) -> SocialProviderFuture<'_, Option<OAuth2UserInfo>>
fn verify_id_token( &self, input: SocialIdTokenRequest, ) -> SocialProviderFuture<'_, bool>
fn refresh_access_token( &self, refresh_token_value: String, ) -> SocialProviderFuture<'_, OAuth2Tokens>
fn revoke_token(&self, token: String) -> SocialProviderFuture<'_, ()>
Auto Trait Implementations§
impl Freeze for GenericOAuthProvider
impl !RefUnwindSafe for GenericOAuthProvider
impl Send for GenericOAuthProvider
impl Sync for GenericOAuthProvider
impl Unpin for GenericOAuthProvider
impl UnsafeUnpin for GenericOAuthProvider
impl !UnwindSafe for GenericOAuthProvider
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