pub struct JWTSource { /* private fields */ }Expand description
A source of JWT SVIDs and bundles that is kept up-to-date by watching the Workload API.
Implementations§
Source§impl JWTSource
impl JWTSource
Sourcepub async fn new<I>(ctx: &Context, options: I) -> Result<JWTSource>
pub async fn new<I>(ctx: &Context, options: I) -> Result<JWTSource>
Creates a new JWTSource with the given options.
It starts watching the Workload API for updates.
Sourcepub async fn fetch_jwt_svid(
&self,
ctx: &Context,
params: Params,
) -> Result<SVID>
pub async fn fetch_jwt_svid( &self, ctx: &Context, params: Params, ) -> Result<SVID>
Fetches a JWT SVID with the given parameters.
Sourcepub async fn fetch_jwt_svids(
&self,
ctx: &Context,
params: Params,
) -> Result<Vec<SVID>>
pub async fn fetch_jwt_svids( &self, ctx: &Context, params: Params, ) -> Result<Vec<SVID>>
Fetches multiple JWT SVIDs with the given parameters.
Sourcepub fn get_jwt_bundle_for_trust_domain(
&self,
trust_domain: TrustDomain,
) -> Result<Bundle>
pub fn get_jwt_bundle_for_trust_domain( &self, trust_domain: TrustDomain, ) -> Result<Bundle>
Returns the JWT bundle for the given trust domain.
Sourcepub async fn wait_until_updated(&self, ctx: &Context) -> Result<()>
pub async fn wait_until_updated(&self, ctx: &Context) -> Result<()>
Waits until the source has been updated for the first time.
Trait Implementations§
Source§impl Source for JWTSource
impl Source for JWTSource
Source§fn get_jwt_bundle_for_trust_domain(
&self,
trust_domain: TrustDomain,
) -> Result<Bundle>
fn get_jwt_bundle_for_trust_domain( &self, trust_domain: TrustDomain, ) -> Result<Bundle>
Returns the JWT bundle for the given trust domain.
Auto Trait Implementations§
impl !Freeze for JWTSource
impl !RefUnwindSafe for JWTSource
impl Send for JWTSource
impl Sync for JWTSource
impl Unpin for JWTSource
impl !UnwindSafe for JWTSource
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request