pub struct ProviderAdapter {
pub provider: &'static str,
pub authorize_endpoint: &'static str,
pub token_endpoint: &'static str,
pub userinfo_endpoint: &'static str,
pub default_scopes: &'static str,
pub pkce_s256: bool,
pub host_allowlist: &'static [&'static str],
}Expand description
One provider’s adapter data: the endpoints, default scopes, PKCE
capability, and host allowlist. Purely compile-time — per-deployment
overrides arrive through EndpointOverrides and are validated against
the allowlist here before use.
Fields§
§provider: &'static strProvider key ("gmail" …) — matches the account row’s provider value.
The authorization endpoint the browser is sent to.
token_endpoint: &'static strThe token endpoint (code exchange AND refresh grant).
userinfo_endpoint: &'static strThe identity endpoint for post-exchange account verification.
default_scopes: &'static strDefault scopes requested when the caller passes none.
pkce_s256: boolWhether the provider supports PKCE S256 (verifier minted per authorization, challenge sent, verifier presented at exchange).
host_allowlist: &'static [&'static str]Hosts this provider’s endpoints may live on (the SSRF allowlist).
Implementations§
Source§impl ProviderAdapter
impl ProviderAdapter
Sourcepub fn validate(
&self,
key: EndpointKey,
url: &str,
) -> Result<ValidatedEndpoint, InvalidEndpoint>
pub fn validate( &self, key: EndpointKey, url: &str, ) -> Result<ValidatedEndpoint, InvalidEndpoint>
Validate a candidate URL as one of this provider’s endpoints — the single rule set every override and every registry value passes.
Trait Implementations§
Source§impl Clone for ProviderAdapter
impl Clone for ProviderAdapter
Auto Trait Implementations§
impl Freeze for ProviderAdapter
impl RefUnwindSafe for ProviderAdapter
impl Send for ProviderAdapter
impl Sync for ProviderAdapter
impl Unpin for ProviderAdapter
impl UnsafeUnpin for ProviderAdapter
impl UnwindSafe for ProviderAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more