Struct pravega_client_auth::DelegationTokenProvider [−][src]
pub struct DelegationTokenProvider { /* fields omitted */ }
Expand description
A client-side proxy for obtaining a delegation token from the server.
Note: Delegation tokens are used by Segment Store services to authorize requests. They are created by Controller at client’s behest.
The implementation is JWT based.
Implementations
impl DelegationTokenProvider
[src]
impl DelegationTokenProvider
[src]pub fn new(stream: ScopedStream) -> Self
[src]
pub async fn retrieve_token(&self, controller: &dyn ControllerClient) -> String
[src]
pub async fn retrieve_token(&self, controller: &dyn ControllerClient) -> String
[src]Returns the delegation token. It returns an existing delegation token if it is not close to expiry. If the token is close to expiry, it obtains a new delegation token and returns that one instead.
pub async fn populate(&self, delegation_token: DelegationToken)
[src]
pub async fn populate(&self, delegation_token: DelegationToken)
[src]Populate the cached token. An empty token can be used when auth is disabled.
pub fn signal_token_expiry(&self)
[src]
pub fn signal_token_expiry(&self)
[src]Mark the token as expired. Token may be marked as invalid by segmentstore due to a time skew between client and segmentstore host. In that case, mark the token as expired so that next time a new token could be fetched from controller.
Auto Trait Implementations
impl !RefUnwindSafe for DelegationTokenProvider
impl Send for DelegationTokenProvider
impl Sync for DelegationTokenProvider
impl Unpin for DelegationTokenProvider
impl !UnwindSafe for DelegationTokenProvider
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> IntoRequest<T> for T
[src]
impl<T> IntoRequest<T> for T
[src]pub fn into_request(self) -> Request<T>
[src]
pub fn into_request(self) -> Request<T>
[src]Wrap the input message T
in a tonic::Request
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
fn with_current_subscriber(self) -> WithDispatch<Self>
[src]Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more