[−][src]Trait rocket_oauth2::Adapter
An OAuth2 Adapater
can be implemented by any type that facilitates the
Authorization Code Grant as described in RFC 6749 §4.1. The implementing
type must be able to generate an authorization URI and perform the token
exchange.
Required methods
fn authorization_uri(
&self,
config: &OAuthConfig,
state: &str,
scopes: &[&str],
extra_params: &[(&str, &str)]
) -> Result<Absolute<'static>, Error>
&self,
config: &OAuthConfig,
state: &str,
scopes: &[&str],
extra_params: &[(&str, &str)]
) -> Result<Absolute<'static>, Error>
Generate an authorization URI as described by RFC 6749 §4.1.1 given
configuration, state, and scopes. Implementations should include
extra_params
in the URI as additional query parameters.
fn exchange_code(
&self,
config: &OAuthConfig,
token: TokenRequest
) -> Result<TokenResponse<()>, Error>
&self,
config: &OAuthConfig,
token: TokenRequest
) -> Result<TokenResponse<()>, Error>
Perform the token exchange in accordance with RFC 6749 §4.1.3 given the authorization code provided by the service.
Implementors
impl Adapter for HyperSyncRustlsAdapter
[src]
fn authorization_uri(
&self,
config: &OAuthConfig,
state: &str,
scopes: &[&str],
extras: &[(&str, &str)]
) -> Result<Absolute<'static>, Error>
[src]
&self,
config: &OAuthConfig,
state: &str,
scopes: &[&str],
extras: &[(&str, &str)]
) -> Result<Absolute<'static>, Error>
fn exchange_code(
&self,
config: &OAuthConfig,
token: TokenRequest
) -> Result<TokenResponse<()>, Error>
[src]
&self,
config: &OAuthConfig,
token: TokenRequest
) -> Result<TokenResponse<()>, Error>