pub struct SDJWTHolder { /* private fields */ }
Implementations§
Source§impl SDJWTHolder
impl SDJWTHolder
Sourcepub fn new(
sd_jwt_with_disclosures: String,
serialization_format: SDJWTSerializationFormat,
) -> Result<Self>
pub fn new( sd_jwt_with_disclosures: String, serialization_format: SDJWTSerializationFormat, ) -> Result<Self>
Build an instance of holder to create one or more presentations based on SD JWT provided by issuer.
§Arguments
sd_jwt_with_disclosures
- SD JWT with disclosures in the format specified byserialization_format
serialization_format
- Serialization format of the SD JWT, see SDJWTSerializationFormat.
§Returns
SDJWTHolder
- Instance of SDJWTHolder
§Errors
InvalidInput
- If the serialization format is not supportedInvalidState
- If the SD JWT data is not validDeserializationError
- If the SD JWT serialization is not valid
Sourcepub fn create_presentation(
&mut self,
claims_to_disclose: Map<String, Value>,
nonce: Option<String>,
aud: Option<String>,
holder_key: Option<EncodingKey>,
sign_alg: Option<String>,
) -> Result<String>
pub fn create_presentation( &mut self, claims_to_disclose: Map<String, Value>, nonce: Option<String>, aud: Option<String>, holder_key: Option<EncodingKey>, sign_alg: Option<String>, ) -> Result<String>
Create a presentation based on the SD JWT provided by issuer.
§Arguments
claims_to_disclose
- Claims to disclose in the presentationnonce
- Nonce to be used in the key-binding JWTaud
- Audience to be used in the key-binding JWTholder_key
- Key to sign the key-binding JWTsign_alg
- Signing algorithm to be used in the key-binding JWT
§Returns
String
- Presentation in the format specified byserialization_format
in the constructor. It can be either compact or json.
Auto Trait Implementations§
impl Freeze for SDJWTHolder
impl RefUnwindSafe for SDJWTHolder
impl Send for SDJWTHolder
impl Sync for SDJWTHolder
impl Unpin for SDJWTHolder
impl UnwindSafe for SDJWTHolder
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