pub struct SDJWTIssuer { /* private fields */ }
Implementations§
Source§impl SDJWTIssuer
impl SDJWTIssuer
Sourcepub fn new(issuer_key: EncodingKey, sign_alg: Option<String>) -> Self
pub fn new(issuer_key: EncodingKey, sign_alg: Option<String>) -> Self
Sourcepub fn issue_sd_jwt(
&mut self,
user_claims: Value,
sd_strategy: ClaimsForSelectiveDisclosureStrategy<'_>,
holder_key: Option<Jwk>,
add_decoy_claims: bool,
serialization_format: SDJWTSerializationFormat,
) -> Result<String>
pub fn issue_sd_jwt( &mut self, user_claims: Value, sd_strategy: ClaimsForSelectiveDisclosureStrategy<'_>, holder_key: Option<Jwk>, add_decoy_claims: bool, serialization_format: SDJWTSerializationFormat, ) -> Result<String>
Issues a SD-JWT.
§Arguments
user_claims
- The claims to be included in the SD-JWT.sd_strategy
- The strategy to be used to determine which claims to be selectively disclosed. See ClaimsForSelectiveDisclosureStrategy for more details.holder_key
- The key used to sign the SD-JWT. If not provided, no key binding is added to the SD-JWT.add_decoy_claims
- If true, decoy claims are added to the SD-JWT.serialization_format
- The serialization format to be used for the SD-JWT, see SDJWTSerializationFormat.
§Returns
The issued SD-JWT as a string in the requested serialization format.
Auto Trait Implementations§
impl Freeze for SDJWTIssuer
impl RefUnwindSafe for SDJWTIssuer
impl Send for SDJWTIssuer
impl Sync for SDJWTIssuer
impl Unpin for SDJWTIssuer
impl UnwindSafe for SDJWTIssuer
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