pub struct ClientCredentials {
pub bearer_token: Option<String>,
pub client_cert_subject: Option<String>,
}Expand description
The raw client credentials extracted from a request by the transport.
Holds only what the authenticator needs; it is dropped after authentication,
so the bearer token never flows downstream. The TLS slice populates
ClientCredentials::client_cert_subject on mTLS termination.
Fields§
§bearer_token: Option<String>A bearer token from the Authorization header, if present.
client_cert_subject: Option<String>The verified client-certificate subject from mTLS, if the connection was mutually authenticated.
Implementations§
Trait Implementations§
Source§impl Clone for ClientCredentials
impl Clone for ClientCredentials
Source§fn clone(&self) -> ClientCredentials
fn clone(&self) -> ClientCredentials
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientCredentials
impl Debug for ClientCredentials
Source§impl Default for ClientCredentials
impl Default for ClientCredentials
Source§fn default() -> ClientCredentials
fn default() -> ClientCredentials
Returns the “default value” for a type. Read more
impl Eq for ClientCredentials
Source§impl PartialEq for ClientCredentials
impl PartialEq for ClientCredentials
Source§fn eq(&self, other: &ClientCredentials) -> bool
fn eq(&self, other: &ClientCredentials) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClientCredentials
Auto Trait Implementations§
impl Freeze for ClientCredentials
impl RefUnwindSafe for ClientCredentials
impl Send for ClientCredentials
impl Sync for ClientCredentials
impl Unpin for ClientCredentials
impl UnsafeUnpin for ClientCredentials
impl UnwindSafe for ClientCredentials
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