pub trait ForwardedUser {
// Required method
fn forwarded_user(&self) -> Option<&str>;
}server only.Expand description
Read a forwarded end-user identity out of a backend’s per-request context.
The StorageProxyBackend port is generic over the host’s context type Cx,
but the client arm needs to forward the caller’s identity to the upstream
Unity Catalog credential vend. This trait lets a backend extract that identity
from any Cx without the backend having to name the host’s concrete context
type: the standalone binary’s context is a ForwardedIdentity (which forwards
the validated reverse-proxy user), while a host that has no forwarded identity
(or the unit context () used by tests) simply returns None.
Required Methods§
Sourcefn forwarded_user(&self) -> Option<&str>
fn forwarded_user(&self) -> Option<&str>
The forwarded end-user name, or None when the request is anonymous /
carries no forwarded identity.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ForwardedUser for ()
The unit context carries no identity — always anonymous.
impl ForwardedUser for ()
The unit context carries no identity — always anonymous.
fn forwarded_user(&self) -> Option<&str>
Implementors§
impl ForwardedUser for ForwardedIdentity
bin only.