pub struct BlockingClient { /* private fields */ }Expand description
Hardened provider-neutral reqwest blocking bearer transport.
Implementations§
Source§impl BlockingClient
impl BlockingClient
Sourcepub fn credential_snapshot(
&self,
) -> Result<BearerCredentialSnapshot, CredentialStateError>
pub fn credential_snapshot( &self, ) -> Result<BearerCredentialSnapshot, CredentialStateError>
Captures the current generation without exposing token bytes.
Sourcepub fn rotate_bearer_token(
&self,
replacement: BearerToken,
) -> Result<CredentialGeneration, CredentialUpdateError>
pub fn rotate_bearer_token( &self, replacement: BearerToken, ) -> Result<CredentialGeneration, CredentialUpdateError>
Atomically replaces the bearer token used by newly started requests.
In-flight requests retain their previous snapshot. The immutable scope cannot change during rotation.
Sourcepub fn rotate_bearer_token_with_lifetime(
&self,
replacement: BearerToken,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, CredentialUpdateError>
pub fn rotate_bearer_token_with_lifetime( &self, replacement: BearerToken, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, CredentialUpdateError>
Atomically replaces an expiring token and its complete lifetime.
Sourcepub fn rotate_bearer_token_from_mut_bytes(
&self,
source: &mut [u8],
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_mut_bytes( &self, source: &mut [u8], ) -> Result<CredentialGeneration, TokenRotationError>
Validates and rotates mutable bytes, clearing the complete source.
Sourcepub fn rotate_bearer_token_from_secret_buffer(
&self,
source: SecretBuffer<'_>,
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_secret_buffer( &self, source: SecretBuffer<'_>, ) -> Result<CredentialGeneration, TokenRotationError>
Validates and rotates guarded storage, which clears on return.
Sourcepub fn rotate_bearer_token_from_mut_bytes_with_lifetime(
&self,
source: &mut [u8],
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_mut_bytes_with_lifetime( &self, source: &mut [u8], lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRotationError>
Clears mutable input and atomically installs an expiring replacement.
Sourcepub fn rotate_bearer_token_from_secret_buffer_with_lifetime(
&self,
source: SecretBuffer<'_>,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRotationError>
pub fn rotate_bearer_token_from_secret_buffer_with_lifetime( &self, source: SecretBuffer<'_>, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRotationError>
Consumes guarded input and atomically installs an expiring replacement.
Sourcepub fn refresh_bearer_token(
&self,
handoff: BearerRefreshHandoff,
replacement: BearerToken,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token( &self, handoff: BearerRefreshHandoff, replacement: BearerToken, ) -> Result<CredentialGeneration, TokenRefreshError>
Installs a refresh only if its captured generation is still current.
Sourcepub fn refresh_bearer_token_with_lifetime(
&self,
handoff: BearerRefreshHandoff,
replacement: BearerToken,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_with_lifetime( &self, handoff: BearerRefreshHandoff, replacement: BearerToken, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRefreshError>
Installs an expiring refresh if its time-qualified handoff is current.
Sourcepub fn refresh_bearer_token_from_mut_bytes(
&self,
handoff: BearerRefreshHandoff,
source: &mut [u8],
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_mut_bytes( &self, handoff: BearerRefreshHandoff, source: &mut [u8], ) -> Result<CredentialGeneration, TokenRefreshError>
Validates refreshed mutable bytes, clears them, and rejects stale work.
Sourcepub fn refresh_bearer_token_from_secret_buffer(
&self,
handoff: BearerRefreshHandoff,
source: SecretBuffer<'_>,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_secret_buffer( &self, handoff: BearerRefreshHandoff, source: SecretBuffer<'_>, ) -> Result<CredentialGeneration, TokenRefreshError>
Consumes guarded refreshed storage and rejects stale work.
Sourcepub fn refresh_bearer_token_from_mut_bytes_with_lifetime(
&self,
handoff: BearerRefreshHandoff,
source: &mut [u8],
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_mut_bytes_with_lifetime( &self, handoff: BearerRefreshHandoff, source: &mut [u8], lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRefreshError>
Clears mutable refresh input and atomically installs its lifetime.
Sourcepub fn refresh_bearer_token_from_secret_buffer_with_lifetime(
&self,
handoff: BearerRefreshHandoff,
source: SecretBuffer<'_>,
lifetime: CredentialLifetime,
) -> Result<CredentialGeneration, TokenRefreshError>
pub fn refresh_bearer_token_from_secret_buffer_with_lifetime( &self, handoff: BearerRefreshHandoff, source: SecretBuffer<'_>, lifetime: CredentialLifetime, ) -> Result<CredentialGeneration, TokenRefreshError>
Consumes guarded refresh input and atomically installs its lifetime.
Trait Implementations§
Source§impl BlockingAuthenticatedTransport for BlockingClient
impl BlockingAuthenticatedTransport for BlockingClient
Source§type Error = TransportFailure<TransportError>
type Error = TransportFailure<TransportError>
Source§fn send_authenticated(
&self,
request: AuthenticatedRequest<'_, '_>,
response: &mut ResponseWriter<'_>,
) -> Result<(), Self::Error>
fn send_authenticated( &self, request: AuthenticatedRequest<'_, '_>, response: &mut ResponseWriter<'_>, ) -> Result<(), Self::Error>
Source§impl BoundTransport for BlockingClient
impl BoundTransport for BlockingClient
Source§fn endpoint_identity(
&self,
) -> Result<EndpointIdentity<'_>, EndpointIdentityError>
fn endpoint_identity( &self, ) -> Result<EndpointIdentity<'_>, EndpointIdentityError>
Source§impl Clone for BlockingClient
impl Clone for BlockingClient
Source§fn clone(&self) -> BlockingClient
fn clone(&self) -> BlockingClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more