pub fn deserialize_json<'a>(
        &self,
        input: impl AsRef<[u8]>,
        verifier: &'a dyn JwsVerifier,
    ) -> Result<(Vec<u8>, JwsHeader), JoseError> {
        self.deserialize_json_with_selector(input, |header| {
            match header.algorithm() {
                Some(val) => {
                    let expected_alg = verifier.algorithm().name();
                    if val != expected_alg {
                        return Ok(None);
                    }
                }
                _ => return Ok(None),
            }

            match verifier.key_id() {
                Some(expected) => match header.key_id() {
                    Some(actual) if expected == actual => {}
                    _ => return Ok(None),
                },
                None => {}
            }

            Ok(Some(verifier))
        })
    }
/// Deserialize the input that is formatted by json serialization.
///
/// # Arguments
///
/// * `input` - The input data.
/// * `header` - The decoded JWS header claims.
/// * `verifier` - The JWS verifier.
Deserialize the input that is formatted by json serialization.
Deserialize the input that is formatted by json serialization .
pub fn deserialize_json<'a>(
        &self,
        input: impl AsRef<[u8]>,
        verifier: &'a dyn JwsVerifier,
    ) -> Result<(Vec<u8>, JwsHeader), JoseError> {
        self.deserialize_json_with_selector(input, |header| {
            match header.algorithm() {
                Some(val) => {
                    let expected_alg = verifier.algorithm().name();
                    if val != expected_alg {
                        return Ok(None);
                    }
                }
                _ => return Ok(None),
            }
            match verifier.key_id() {
                Some(expected) => match header.key_id() {
                    Some(actual) if expected == actual => {}
                    _ => return Ok(None),
                },
                None => {}
            }
            Ok(Some(verifier))
        })
    }
pub fn deserialize_json < ' a > ( & self , input : impl AsRef < [ u8 ] > , verifier : & ' a dyn JwsVerifier , ) -> Result < ( Vec < u8 > , JwsHeader ) , JoseError > { self . deserialize_json_with_selector ( input , | header | { match header . algorithm ( ) { Some ( val ) => { let expected_alg = verifier . algorithm ( ) . name ( ) ; if val != expected_alg { return Ok ( None ) ; } } _ => return Ok ( None ) , } match verifier . key_id ( ) { Some ( expected ) => match header . key_id ( ) { Some ( actual ) if expected == actual => { } _ => return Ok ( None ) , } , None => { } } Ok ( Some ( verifier ) ) } ) }
Deserialize the input that is formatted by json serialization.
Deserialize the input that is formatted by json serialization .
&self
input
impl AsRef<[u8]>
verifier
&'a dyn JwsVerifier
&self
input
impl AsRef<[u8]>
verifier
&'a dyn JwsVerifier