identity_credential/validator/jpt_presentation_validation/
jpt_presentation_validation_options.rs1use identity_document::verifiable::JwpVerificationOptions;
5use serde::Deserialize;
6use serde::Serialize;
7
8#[derive(Debug, Default, Clone, Serialize, Deserialize)]
10#[non_exhaustive]
11#[serde(rename_all = "camelCase")]
12pub struct JptPresentationValidationOptions {
13 #[serde(default)]
15 pub nonce: Option<String>,
16
17 #[serde(default)]
19 pub verification_options: JwpVerificationOptions,
20}
21
22impl JptPresentationValidationOptions {
23 pub fn new() -> Self {
25 Self::default()
26 }
27
28 pub fn nonce(mut self, nonce: impl Into<String>) -> Self {
31 self.nonce = Some(nonce.into());
32 self
33 }
34
35 pub fn verification_options(mut self, options: JwpVerificationOptions) -> Self {
37 self.verification_options = options;
38 self
39 }
40}