pub enum DriverOAuthFlow {
OpenRouterPkce,
}Expand description
Wire flavor of a driver’s interactive OAuth connect flow.
A driver may let an org admin connect a provider by authorizing in the
browser instead of pasting an API key. The flow always yields a long-lived
credential that lands in providers.credentials_encrypted, exactly like a
hand-entered key — so runtime resolution is unchanged and non-admin users
are unaffected (see specs/providers.md “OAuth provider connection”).
Only OpenRouter’s PKCE flavor exists today. Adding OAuth to another driver
means a new variant here (which the server matches on) plus a
DriverOAuthConfig on that driver’s descriptor — never a parallel set of
endpoints.
Variants§
OpenRouterPkce
OpenRouter one-click PKCE
(https://openrouter.ai/docs/guides/overview/auth/oauth): redirect the
admin to authorize_url?callback_url=..&code_challenge=..&code_challenge_method=S256,
then POST JSON {code, code_verifier, code_challenge_method} to
token_url; the key field of the response is the user-controlled API
key to store. No client registration or secret is required (public PKCE
client).
Trait Implementations§
Source§impl Clone for DriverOAuthFlow
impl Clone for DriverOAuthFlow
Source§fn clone(&self) -> DriverOAuthFlow
fn clone(&self) -> DriverOAuthFlow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DriverOAuthFlow
Source§impl Debug for DriverOAuthFlow
impl Debug for DriverOAuthFlow
impl Eq for DriverOAuthFlow
Source§impl PartialEq for DriverOAuthFlow
impl PartialEq for DriverOAuthFlow
impl StructuralPartialEq for DriverOAuthFlow
Auto Trait Implementations§
impl Freeze for DriverOAuthFlow
impl RefUnwindSafe for DriverOAuthFlow
impl Send for DriverOAuthFlow
impl Sync for DriverOAuthFlow
impl Unpin for DriverOAuthFlow
impl UnsafeUnpin for DriverOAuthFlow
impl UnwindSafe for DriverOAuthFlow
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request