Skip to main content

SimpleOAuthProvider

Trait SimpleOAuthProvider 

Source
pub trait SimpleOAuthProvider:
    Debug
    + Send
    + Sync {
    // Required methods
    fn authorize_url(&self) -> &str;
    fn token_url(&self) -> &str;

    // Provided methods
    fn default_scopes(&self) -> &'static [&'static str] { ... }
    fn token_auth_method(&self) -> TokenAuthMethod { ... }
}
Expand description

Trait for all OAuth providers

Required Methods§

Source

fn authorize_url(&self) -> &str

The authorization endpoint of the provider

Source

fn token_url(&self) -> &str

The token endpoint of the provider

Provided Methods§

Source

fn default_scopes(&self) -> &'static [&'static str]

Default scopes used when building the provider’s authorization URL.

Source

fn token_auth_method(&self) -> TokenAuthMethod

How the OAuth client should authenticate to the provider’s token endpoint.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> SimpleOAuthProvider for Arc<T>

Source§

fn authorize_url(&self) -> &str

Source§

fn token_url(&self) -> &str

Source§

fn default_scopes(&self) -> &'static [&'static str]

Source§

fn token_auth_method(&self) -> TokenAuthMethod

Source§

impl<T> SimpleOAuthProvider for Box<T>

Source§

fn authorize_url(&self) -> &str

Source§

fn token_url(&self) -> &str

Source§

fn default_scopes(&self) -> &'static [&'static str]

Source§

fn token_auth_method(&self) -> TokenAuthMethod

Implementors§