Skip to content

Conversation

@Ryanmtate
Copy link
Contributor

This pull request introduces enhancements to the Mdoc struct in rust/src/credential/mdoc.rs, adding functionality to check expiration status and improving time-handling capabilities. The most important changes include the addition of two new accessor methods for expiration checks and the inclusion of a new time-related import.

Enhancements to Mdoc struct:

  • Added is_mdoc_expired method to determine if the MSO (Mobile Security Object) has expired based on its valid_until field. This method uses the current UTC time for comparison.
  • Added will_expire_in_num_days method to check if the MSO will expire within a specified number of days. This method calculates a target date using the current UTC time and the provided duration.

Time-handling improvements:

  • Updated imports to include OffsetDateTime from the time crate, enabling precise time comparisons for the new methods.

Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
@Ryanmtate Ryanmtate changed the title wip: add mdoc expiration helper methods add mdoc expiration helper methods Dec 10, 2025
@Ryanmtate Ryanmtate marked this pull request as ready for review December 10, 2025 19:21
Signed-off-by: Ryan Tate <ryan.tate@spruceid.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants