#[non_exhaustive]pub enum OAuthFlows {
AuthorizationCode(AuthorizationCodeFlow),
ClientCredentials(ClientCredentialsFlow),
Implicit(ImplicitFlow),
Password(PasswordOAuthFlow),
DeviceCode(DeviceCodeFlow),
}Expand description
Defines the configuration for the supported OAuth 2.0 flows.
Per the proto definition, this is a oneof flow — exactly one flow type
can be specified. Serialized as an externally tagged enum in JSON.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AuthorizationCode(AuthorizationCodeFlow)
Configuration for the OAuth Authorization Code flow.
ClientCredentials(ClientCredentialsFlow)
Configuration for the OAuth Client Credentials flow.
Implicit(ImplicitFlow)
deprecated in A2A 1.0; use Authorization Code + PKCE
Deprecated: Use Authorization Code + PKCE instead.
Kept so cards that still declare it parse (spec §1.4: deprecated
definitions stay until the next major version), and marked
#[deprecated] as the proto marks the field:
#[deny(deprecated)]
fn implicit(f: &a2a_protocol_types::security::OAuthFlows) -> bool {
matches!(f, a2a_protocol_types::security::OAuthFlows::Implicit(_))
}Password(PasswordOAuthFlow)
deprecated in A2A 1.0; use Authorization Code + PKCE or Device Code
Deprecated: Use Authorization Code + PKCE or Device Code.
Kept and marked as Implicit is:
#[deny(deprecated)]
fn password(f: &a2a_protocol_types::security::OAuthFlows) -> bool {
matches!(f, a2a_protocol_types::security::OAuthFlows::Password(_))
}DeviceCode(DeviceCodeFlow)
Configuration for the OAuth Device Code flow.
Trait Implementations§
Source§impl Clone for OAuthFlows
impl Clone for OAuthFlows
Source§fn clone(&self) -> OAuthFlows
fn clone(&self) -> OAuthFlows
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OAuthFlows
impl Debug for OAuthFlows
Source§impl<'de> Deserialize<'de> for OAuthFlows
impl<'de> Deserialize<'de> for OAuthFlows
Source§fn deserialize<D>(
deserializer: D,
) -> Result<OAuthFlows, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<OAuthFlows, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<OAuthFlows> for OAuthFlows
impl From<OAuthFlows> for OAuthFlows
Source§fn from(value: OAuthFlows) -> OAuthFlows
fn from(value: OAuthFlows) -> OAuthFlows
Source§impl Serialize for OAuthFlows
impl Serialize for OAuthFlows
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<OAuthFlows> for OAuthFlows
impl TryFrom<OAuthFlows> for OAuthFlows
Source§type Error = ConvertError
type Error = ConvertError
Source§fn try_from(
value: OAuthFlows,
) -> Result<OAuthFlows, <OAuthFlows as TryFrom<OAuthFlows>>::Error>
fn try_from( value: OAuthFlows, ) -> Result<OAuthFlows, <OAuthFlows as TryFrom<OAuthFlows>>::Error>
Auto Trait Implementations§
impl Forget for OAuthFlows
impl Freeze for OAuthFlows
impl Move for OAuthFlows
impl RefUnwindSafe for OAuthFlows
impl Send for OAuthFlows
impl Sync for OAuthFlows
impl Unpin for OAuthFlows
impl UnsafeUnpin for OAuthFlows
impl UnwindSafe for OAuthFlows
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].