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

fix: add support for legacy schema and cred def id #137

Merged
merged 2 commits into from
Mar 11, 2023

Conversation

berendsliedrecht
Copy link
Contributor

@genaris this should fix your issue regarding the invalid cred_def / schema identifiers.

I was wondering if anyone knows a regex to match the revocation registry definition id and the revocation registry id.

Since the new identifier checker checks if it's just a uri, we will validate incorrect schemas with a version of 3 for example. Curious to hear if we want to fix this or leave as-is.

"CredentialDefinitionId" => &LEGACY_CRED_DEF_IDENTIFIER,
"SchemaId" => &LEGACY_SCHEMA_IDENTIFIER,
// TODO: we do not have correct validation for a revocation registry and definition id
"RevocationRegistryId" => &LEGACY_DID_IDENTIFIER,
Copy link
Member

Choose a reason for hiding this comment

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

Both are the same (rev reg id and rev reg def id). You can find regexes for this in identifiers.ts in afj

@TimoGlastra
Copy link
Member

Already going to merge this, but would be good if you can make another pr with the changes for rev regs

@TimoGlastra TimoGlastra merged commit 32cb53a into hyperledger:main Mar 11, 2023
@berendsliedrecht berendsliedrecht deleted the fix/identifier-check branch May 28, 2023 12:23
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