pub struct CallerIdentity {
pub subject: String,
pub auth_method: AuthMethod,
pub verified: bool,
pub tenant: Option<String>,
pub agent_id: Option<String>,
}Expand description
The identity of the caller as extracted from the HTTP request. This is protocol-agnostic – the same type is used regardless of whether the request came through a reverse proxy, framework middleware, or sidecar.
Fields§
§subject: StringStable identifier for the caller (e.g., user ID, service account, agent ID). Extracted from the auth credential.
auth_method: AuthMethodHow the caller authenticated.
verified: boolWhether this identity has been verified (e.g., JWT signature checked, API key looked up). False means the identity was extracted but not cryptographically validated.
tenant: Option<String>Optional tenant or organization the caller belongs to.
agent_id: Option<String>Optional agent identifier when the caller is an AI agent.
Implementations§
Trait Implementations§
Source§impl Clone for CallerIdentity
impl Clone for CallerIdentity
Source§fn clone(&self) -> CallerIdentity
fn clone(&self) -> CallerIdentity
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 CallerIdentity
impl Debug for CallerIdentity
Source§impl<'de> Deserialize<'de> for CallerIdentity
impl<'de> Deserialize<'de> for CallerIdentity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CallerIdentity
impl RefUnwindSafe for CallerIdentity
impl Send for CallerIdentity
impl Sync for CallerIdentity
impl Unpin for CallerIdentity
impl UnsafeUnpin for CallerIdentity
impl UnwindSafe for CallerIdentity
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