pub trait WithSecurityContext {
// Required method
fn security_ctx<'a>(&'a self, ctx: &'a SecurityContext) -> Secured<'a, Self>
where Self: Sized;
}Expand description
Required Methods§
Sourcefn security_ctx<'a>(&'a self, ctx: &'a SecurityContext) -> Secured<'a, Self>where
Self: Sized,
fn security_ctx<'a>(&'a self, ctx: &'a SecurityContext) -> Secured<'a, Self>where
Self: Sized,
Binds a security context to this client, returning a Secured wrapper.
§Arguments
ctx- Reference to the security context to bind
§Returns
A Secured wrapper containing references to both the client and context.
§Example
ⓘ
let secured = client.security_ctx(&ctx);
assert_eq!(secured.ctx().subject_tenant_id(), ctx.subject_tenant_id());