Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: revocation by document hash #1

Merged
merged 20 commits into from
Jun 7, 2022
Merged

feat: revocation by document hash #1

merged 20 commits into from
Jun 7, 2022

Conversation

HJunyuan
Copy link
Member

@HJunyuan HJunyuan commented May 24, 2022

Context

  • This reference implementation started off with revocation by document ID
  • In order to align with how we perform revocation of documents issued onto the Ethereum document store, revocation by merkle root and intermediate hashes should be performed by the OCSP Responder (i.e. do not revoke by document id)

What does this PR do?

  • Refactor naming convention from documentId -> documentHash
  • Modify API response body: revoked = true / false, success = true / false, etc.
  • Add plugins to support local development: npm run dev
  • Improve readability of README
  • Serverless deployment example: npm run deploy (i.e. sls deploy)


import schema from "./schema";

const REASON_CODES = [...Array(11).keys()];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever, but reads poorly, could you wrap it around a generate range function and put it in utils?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly, will change it to:

Suggested change
const REASON_CODES = [...Array(11).keys()];
const REASON_CODES = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

@HJunyuan HJunyuan requested a review from cavacado June 7, 2022 02:47
Copy link

@cavacado cavacado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 lgtm lets go

@HJunyuan HJunyuan merged commit 6827262 into main Jun 7, 2022
@HJunyuan HJunyuan deleted the feat/revoke-by-hash branch June 7, 2022 02:56
@Abdulhakimsg
Copy link

Thanks for this feature! Extremely useful for our team

  • In order to align with how we perform revocation of documents issued onto the Ethereum document store, revocation by merkle root and intermediate hashes should be performed by the OCSP Responder (i.e. do not revoke by document id)

Alt Text

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.

3 participants