[][src]Struct rocket_oauth2::StaticProvider

pub struct StaticProvider {
    pub auth_uri: Cow<'static, str>,
    pub token_uri: Cow<'static, str>,
}

A StaticProvider contains authorization and token exchange URIs known in advance, either at compile-time or early in initialization.

If the URIs will change during runtime, implement Provider for your own type instead.

Example

use rocket_oauth2::StaticProvider;

let provider = StaticProvider {
    auth_uri: "https://example.com/oauth2/authorize".into(),
    token_uri: "https://example.com/oauth2/token".into(),
};

Fields

auth_uri: Cow<'static, str>

The authorization URI associated with the service provider.

token_uri: Cow<'static, str>

The token exchange URI associated with the service provider.

Implementations

impl StaticProvider[src]

pub const Discord: StaticProvider[src]

A Provider suitable for authorizing users with Discord.

pub const Facebook: StaticProvider[src]

A Provider suitable for authorizing users with Facebook.

pub const GitHub: StaticProvider[src]

A Provider suitable for authorizing users with GitHub.

pub const Google: StaticProvider[src]

A Provider suitable for authorizing users with Google.

pub const Microsoft: StaticProvider[src]

A Provider suitable for authorizing users with Microsoft.

pub const Reddit: StaticProvider[src]

A Provider suitable for authorizing users with Reddit.

pub const Wikimedia: StaticProvider[src]

A Provider suitable for authorizing users with Wikimedia.

pub const Yahoo: StaticProvider[src]

A Provider suitable for authorizing users with Yahoo.

Trait Implementations

impl Clone for StaticProvider[src]

impl Debug for StaticProvider[src]

impl Eq for StaticProvider[src]

impl Hash for StaticProvider[src]

impl PartialEq<StaticProvider> for StaticProvider[src]

impl Provider for StaticProvider[src]

impl StructuralEq for StaticProvider[src]

impl StructuralPartialEq for StaticProvider[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, I> AsResult<T, I> for T where
    I: Input, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoCollection<T> for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,