pub struct AuthExpectations {
pub issuer: String,
pub audience: String,
pub kid: String,
}Expand description
Expected JWT shape for test verification.
Fields§
§issuer: StringExpected iss claim.
audience: StringExpected aud claim.
kid: StringExpected key id from JWT header.
Implementations§
Source§impl AuthExpectations
impl AuthExpectations
Sourcepub fn new(
issuer: impl Into<String>,
audience: impl Into<String>,
kid: impl Into<String>,
) -> Self
pub fn new( issuer: impl Into<String>, audience: impl Into<String>, kid: impl Into<String>, ) -> Self
Build expected issuer/audience/kid values.
Sourcepub fn with_issuer(self, issuer: impl Into<String>) -> Self
pub fn with_issuer(self, issuer: impl Into<String>) -> Self
Replace expected issuer.
Sourcepub fn with_audience(self, audience: impl Into<String>) -> Self
pub fn with_audience(self, audience: impl Into<String>) -> Self
Replace expected audience.
Trait Implementations§
Source§impl Clone for AuthExpectations
impl Clone for AuthExpectations
Source§fn clone(&self) -> AuthExpectations
fn clone(&self) -> AuthExpectations
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 moreSource§impl Debug for AuthExpectations
impl Debug for AuthExpectations
Source§impl<'de> Deserialize<'de> for AuthExpectations
impl<'de> Deserialize<'de> for AuthExpectations
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AuthExpectations
impl PartialEq for AuthExpectations
Source§fn eq(&self, other: &AuthExpectations) -> bool
fn eq(&self, other: &AuthExpectations) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AuthExpectations
impl Serialize for AuthExpectations
impl Eq for AuthExpectations
impl StructuralPartialEq for AuthExpectations
Auto Trait Implementations§
impl Freeze for AuthExpectations
impl RefUnwindSafe for AuthExpectations
impl Send for AuthExpectations
impl Sync for AuthExpectations
impl Unpin for AuthExpectations
impl UnsafeUnpin for AuthExpectations
impl UnwindSafe for AuthExpectations
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