pub struct Bundle { /* private fields */ }Expand description
A JWT bundle contains the JWT authorities (public keys) for a trust domain.
Implementations§
Source§impl Bundle
impl Bundle
Sourcepub fn new(trust_domain: TrustDomain) -> Bundle
pub fn new(trust_domain: TrustDomain) -> Bundle
Creates a new empty Bundle for the given trust domain.
Creates a new Bundle for the given trust domain and authorities.
Sourcepub fn load(trust_domain: TrustDomain, path: &str) -> Result<Bundle>
pub fn load(trust_domain: TrustDomain, path: &str) -> Result<Bundle>
Loads a JWT bundle from a JSON file (JWKS).
Sourcepub fn read(trust_domain: TrustDomain, reader: &mut dyn Read) -> Result<Bundle>
pub fn read(trust_domain: TrustDomain, reader: &mut dyn Read) -> Result<Bundle>
Reads a JWT bundle from a reader.
Sourcepub fn parse(trust_domain: TrustDomain, bytes: &[u8]) -> Result<Bundle>
pub fn parse(trust_domain: TrustDomain, bytes: &[u8]) -> Result<Bundle>
Parses a JWT bundle from JSON bytes (JWKS).
Sourcepub fn trust_domain(&self) -> TrustDomain
pub fn trust_domain(&self) -> TrustDomain
Returns the trust domain of the bundle.
Returns the JWT authorities in the bundle.
Finds a JWT authority by its key ID.
Returns true if the bundle has an authority with the given key ID.
Adds a JWT authority to the bundle.
Removes a JWT authority from the bundle.
Sets the JWT authorities in the bundle.
Sourcepub fn clone_bundle(&self) -> Bundle
pub fn clone_bundle(&self) -> Bundle
Clones the bundle.
Sourcepub fn equal(&self, other: &Bundle) -> bool
pub fn equal(&self, other: &Bundle) -> bool
Returns true if this bundle is equal to another bundle.
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 bundle for the given trust domain if it matches.
Trait Implementations§
Source§impl Source for Bundle
impl Source for Bundle
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 Bundle
impl RefUnwindSafe for Bundle
impl Send for Bundle
impl Sync for Bundle
impl Unpin for Bundle
impl UnwindSafe for Bundle
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