Trait telescope::web::services::auth::oauth2_providers::Oauth2IdentityProvider[][src]

pub trait Oauth2IdentityProvider {
    type IdentityType: Oauth2Identity;

    const SERVICE_NAME: &'static str;

    fn get_client() -> Arc<BasicClient>;
fn scopes() -> Vec<Scope>
Notable traits for Vec<u8, A>
impl<A> Write for Vec<u8, A> where
    A: Allocator
; fn auth_response(
        redir_url: RedirectUrl,
        http_req: &HttpRequest
    ) -> Result<HttpResponse, TelescopeError> { ... }
fn token_exchange(
        redirect_uri: RedirectUrl,
        req: &HttpRequest
    ) -> Result<BasicTokenResponse, TelescopeError> { ... } }
Expand description

Special trait specifically for OAuth2 Identity providers that implements certain methods in the IdentityProvider trait automatically.

Associated Types

The type of identity produced by this provider.

Associated Constants

Name of this identity provider. See the documentation on the IdentityProvider trait for requirements.

Required methods

Get the client configuration for this Identity Provider.

Add the appropriate scopes for the OAuth authentication request.

Provided methods

Get the redirect URL for the associated client and build an HTTP response to take the user there. Saves the CSRF token in the process.

Extract the response parameters from the callback request invoked by the provider’s authorization page.

Implementors