pub fn decode_with_verifier_in_jwk_set<F>(
        &self,
        input: impl AsRef<[u8]>,
        jwk_set: &JwkSet,
        selector: F,
    ) -> Result<(JwtPayload, JwsHeader), JoseError>
    where
        F: Fn(&Jwk) -> Result<Option<&dyn JwsVerifier>, JoseError>,
    {
        self.decode_with_verifier_selector(input, |header| {
            let key_id = match header.key_id() {
                Some(val) => val,
                None => return Ok(None),
            };

            for jwk in jwk_set.get(key_id) {
                if let Some(val) = selector(jwk)? {
                    return Ok(Some(val));
                }
            }
            Ok(None)
        })
    }
/// Return the JWT object decoded by using a JWK set.
///
/// # Arguments
///
/// * `input` - a JWT string representation.
/// * `jwk_set` - a JWK set.
/// * `selector` - a function for selecting the verifying algorithm.
Return the JWT object decoded by using a JWK set.
Return the JWT object decoded by using a JWK set .
pub fn decode_with_verifier_in_jwk_set<F>(
        &self,
        input: impl AsRef<[u8]>,
        jwk_set: &JwkSet,
        selector: F,
    ) -> Result<(JwtPayload, JwsHeader), JoseError>
    where
        F: Fn(&Jwk) -> Result<Option<&dyn JwsVerifier>, JoseError>,
    {
        self.decode_with_verifier_selector(input, |header| {
            let key_id = match header.key_id() {
                Some(val) => val,
                None => return Ok(None),
            };
            for jwk in jwk_set.get(key_id) {
                if let Some(val) = selector(jwk)? {
                    return Ok(Some(val));
                }
            }
            Ok(None)
        })
    }
pub fn decode_with_verifier_in_jwk_set < F > ( & self , input : impl AsRef < [ u8 ] > , jwk_set : & JwkSet , selector : F , ) -> Result < ( JwtPayload , JwsHeader ) , JoseError > where F : Fn ( & Jwk ) -> Result < Option < & dyn JwsVerifier > , JoseError > , { self . decode_with_verifier_selector ( input , | header | { let key_id = match header . key_id ( ) { Some ( val ) => val , None => return Ok ( None ) , } ; for jwk in jwk_set . get ( key_id ) { if let Some ( val ) = selector ( jwk ) ? { return Ok ( Some ( val ) ) ; } } Ok ( None ) } ) }
Return the JWT object decoded by using a JWK set.
Return the JWT object decoded by using a JWK set .
&self
input
impl AsRef<[u8]>
jwk_set
&JwkSet
selector
F
&self
input
impl AsRef<[u8]>
jwk_set
&JwkSet
selector
F