Skip to content

feat: Implement credential revocation logic#110

Merged
Josie123-Dev merged 2 commits into
GuardZero144:mainfrom
all-opensource-projects:feature/credential-revocation-91
Jun 21, 2026
Merged

feat: Implement credential revocation logic#110
Josie123-Dev merged 2 commits into
GuardZero144:mainfrom
all-opensource-projects:feature/credential-revocation-91

Conversation

@meshackyaro

@meshackyaro meshackyaro commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Description

This PR implements comprehensive credential revocation logic for the verification system.

Changes

  • Added revocation fields to VerificationRecord (revoked, revoked_at, revocation_reason)
  • Implemented revoke_verification() function with reason parameter
  • Added is_verification_revoked() to check revocation status
  • Added get_revocation_status() to retrieve full revocation details
  • Implemented revocation list maintenance with get_revoked_verifications()
  • Added is_verification_valid() helper to check both approval and revocation
  • Emit VerificationRevoked events when credentials are revoked
  • Comprehensive test coverage for all revocation scenarios
  • Error handling tests for nonexistent verifications

Testing

All 73 tests pass successfully, including:

  • test_revoke_verification_credential
  • test_revocation_status_updates
  • test_revocation_list_maintenance
  • test_is_verification_valid
  • test_revoke_rejected_verification
  • test_multiple_verifications_independent_revocation

Acceptance Criteria

  • Revocation works
  • Status is updated
  • List is maintained
  • Check works
  • Events are emitted

Closes #91

- Add revocation fields to VerificationRecord (revoked, revoked_at, revocation_reason)
- Implement revoke_verification() function with reason parameter
- Add is_verification_revoked() to check revocation status
- Add get_revocation_status() to retrieve full revocation details
- Implement revocation list maintenance with get_revoked_verifications()
- Add is_verification_valid() helper to check both approval and revocation
- Emit VerificationRevoked events when credentials are revoked
- Add comprehensive test coverage for all revocation scenarios
- Include error handling tests for nonexistent verifications

Closes GuardZero144#91
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

@meshackyaro is attempting to deploy a commit to the Josie's projects Team on Vercel.

A member of the Team first needs to authorize it.

Replace revoked_at >= 0 assertion with silent assignment to avoid
clippy::absurd_extreme_comparisons warning for u64 type
@Josie123-Dev Josie123-Dev merged commit 7e9cb53 into GuardZero144:main Jun 21, 2026
1 of 2 checks passed
@Josie123-Dev

Copy link
Copy Markdown
Member

Thank you @meshackyaro for you contribution

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.

[Medium] Implement credential revocation logic

2 participants