pub struct TlsConnection {
pub is_secure: bool,
pub version: TlsVersion,
pub has_client_cert: bool,
pub client_cert_valid: bool,
}Expand description
TLS connection information extracted from HTTP request.
This struct captures the essential TLS/security information from an incoming connection. It’s created by the HTTP adapter layer and passed to the enforcer for validation.
Fields§
§is_secure: boolWhether the connection is over HTTPS/TLS (true) or HTTP (false)
version: TlsVersionThe TLS protocol version used (only valid if is_secure=true)
has_client_cert: boolWhether a client certificate was presented
client_cert_valid: boolWhether the client certificate has been validated by the server (Note: The server does this validation; this flag indicates the result)
Implementations§
Source§impl TlsConnection
impl TlsConnection
Sourcepub fn new_secure(version: TlsVersion) -> Self
pub fn new_secure(version: TlsVersion) -> Self
Create a new secure TLS connection
Sourcepub fn new_secure_with_client_cert(version: TlsVersion) -> Self
pub fn new_secure_with_client_cert(version: TlsVersion) -> Self
Create a new secure TLS connection with a valid client certificate
Trait Implementations§
Source§impl Clone for TlsConnection
impl Clone for TlsConnection
Source§fn clone(&self) -> TlsConnection
fn clone(&self) -> TlsConnection
Returns a duplicate of the value. Read more
1.0.0 · 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 TlsConnection
impl Debug for TlsConnection
Source§impl PartialEq for TlsConnection
impl PartialEq for TlsConnection
impl Eq for TlsConnection
impl StructuralPartialEq for TlsConnection
Auto Trait Implementations§
impl Freeze for TlsConnection
impl RefUnwindSafe for TlsConnection
impl Send for TlsConnection
impl Sync for TlsConnection
impl Unpin for TlsConnection
impl UnsafeUnpin for TlsConnection
impl UnwindSafe for TlsConnection
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.