pub struct BearerCredential { /* private fields */ }Expand description
One bounded POC capability bearer credential.
Formatting is always redacted. This transport wrapper validates only the exact length and alphabet needed for safe metadata presentation. The auth-owned server decoder remains the sole authority for canonical token decoding and authentication.
Implementations§
Source§impl BearerCredential
impl BearerCredential
Sourcepub fn new(token: &str) -> Result<Self, MetadataError>
pub fn new(token: &str) -> Result<Self, MetadataError>
Constructs a bearer credential from bounded v1 presentation text.
Sourcepub fn has_same_presentation(&self, other: &Self) -> bool
pub fn has_same_presentation(&self, other: &Self) -> bool
Reports whether two checked credentials have the same presentation.
This is a non-exposing equality check for delivery verification, not a constant-time authentication primitive.
Trait Implementations§
Source§impl Clone for BearerCredential
impl Clone for BearerCredential
Source§fn clone(&self) -> BearerCredential
fn clone(&self) -> BearerCredential
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 moreAuto Trait Implementations§
impl !Freeze for BearerCredential
impl RefUnwindSafe for BearerCredential
impl Send for BearerCredential
impl Sync for BearerCredential
impl Unpin for BearerCredential
impl UnsafeUnpin for BearerCredential
impl UnwindSafe for BearerCredential
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].