#[non_exhaustive]pub enum ClientAuth {
Post,
Basic,
}Expand description
How the client credentials are presented to the token endpoint.
OAuth 2.0 defines both and RFC 6749 §2.3.1 says a server must support the
Basic form; providers differ in what they accept, and picking the wrong
one is rejected as invalid_client — which reads like a wrong secret. The
provider presets choose for you; this is here for a custom endpoint that
wants the other one. #[non_exhaustive]: a provider may need a third form
(a signed assertion, say) without that being a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Post
client_secret_post — id and secret in the request body. The default,
and what Keycloak and Auth0 accept.
Basic
client_secret_basic — id and secret in an HTTP Authorization: Basic
header. Okta’s default for a confidential client.
Trait Implementations§
Source§impl Clone for ClientAuth
impl Clone for ClientAuth
impl Copy for ClientAuth
Source§impl Debug for ClientAuth
impl Debug for ClientAuth
Source§impl Default for ClientAuth
impl Default for ClientAuth
impl Eq for ClientAuth
Source§impl Hash for ClientAuth
impl Hash for ClientAuth
Source§impl PartialEq for ClientAuth
impl PartialEq for ClientAuth
impl StructuralPartialEq for ClientAuth
Auto Trait Implementations§
impl Freeze for ClientAuth
impl RefUnwindSafe for ClientAuth
impl Send for ClientAuth
impl Sync for ClientAuth
impl Unpin for ClientAuth
impl UnsafeUnpin for ClientAuth
impl UnwindSafe for ClientAuth
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request