Trait inth_oauth2::provider::Provider [] [src]

pub trait Provider {
    type Lifetime: Lifetime;
    type Token: Token<Self::Lifetime>;
    fn auth_uri() -> &'static str;
    fn token_uri() -> &'static str;

    fn credentials_in_body() -> bool { ... }
}

OAuth 2.0 providers.

Associated Types

type Lifetime: Lifetime

The lifetime of tokens issued by the provider.

type Token: Token<Self::Lifetime>

The type of token issued by the provider.

Required Methods

fn auth_uri() -> &'static str

The authorization endpoint URI.

See RFC 6749, section 3.1.

Note: likely to become an associated constant.

fn token_uri() -> &'static str

The token endpoint URI.

See RFC 6749, section 3.2.

Note: likely to become an associated constant.

Provided Methods

fn credentials_in_body() -> bool

Provider requires credentials via request body.

Although not recommended by the RFC, some providers require client_id and client_secret as part of the request body.

See RFC 6749, section 2.3.1.

Note: likely to become an associated constant.

Implementors