pub struct ProviderConfig {
pub authorize_url: String,
pub token_url: String,
pub revoke_url: Option<String>,
pub client_id: String,
pub client_secret: Option<String>,
pub scopes: Vec<String>,
pub scope_separator: &'static str,
pub client_auth: ClientAuth,
}Expand description
One OAuth 2.0 provider, as far as this crate needs to know it. Built once per call site (the credentials usually come from config), never global.
Fields§
The authorization endpoint a human’s browser opens.
token_url: StringThe token endpoint, POST, form-encoded (RFC 6749 §3.2).
revoke_url: Option<String>The revocation endpoint (RFC 7009), when the provider documents one.
OAuthClient::revoke refuses to run
without it rather than guessing.
client_id: StringThe client id the provider issued.
client_secret: Option<String>The client secret, for the providers that issue one.
scopes: Vec<String>Scopes requested at authorize time, joined with
ProviderConfig::scope_separator. Token responses carry the scopes
the provider actually granted; ask at authorize, verify after.
scope_separator: &'static strHow the scope list is joined in the authorize URL. Space per RFC 6749 §3.3, which every provider this crate has met uses.
client_auth: ClientAuthWhere the client credentials ride on token calls.