-
Notifications
You must be signed in to change notification settings - Fork 3
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: validate credential expiration #49
feat: validate credential expiration #49
Conversation
7bd2299
to
ba302fb
Compare
ba302fb
to
02559b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment about improving the VerificationResult
but I think this PR looks great!
return verificationResult(false, ERRORS.IssuerCredentialRevoked); | ||
const revocationStatusResult = | ||
await this.revocationVerification.checkRevocationStatus(issuer, role); | ||
if (!revocationStatusResult.status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this line pretty confusing because I typically expect status
to be an enum of some kind instead of a boolean (e.g. HTTP status code are are large list)
This is probably a different task, but what do you think of either:
- renaming
status
toverified
and keeping it as a boolean - changing
status
to an enum of possible values (e.g.VERIFIED
,NOT_VERIFIED
) - or some other option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, renaming it to verified
sounds good. IMO boolean
fits the return type and eases the validation upon it.
This PR add validation for credential expiration for
RoleEIP191Jwt
.