-
Notifications
You must be signed in to change notification settings - Fork 71
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: upgrade to local did resolver #48
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
mi-xu
changed the title
[WIP] feat: upgrade to local did resolver
feat: upgrade to local did resolver
Aug 22, 2019
mi-xu
changed the title
feat: upgrade to local did resolver
[WIP] feat: upgrade to local did resolver
Aug 22, 2019
mi-xu
changed the title
[WIP] feat: upgrade to local did resolver
feat: upgrade to local did resolver
Aug 22, 2019
mirceanis
approved these changes
Aug 23, 2019
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.
Excellent work.
There's one tiny nit but it can be deferred to the test overhaul.
mi-xu
added a commit
that referenced
this pull request
Aug 26, 2019
* change iat to nbf * feat: Set `iat` timestamp by default instead of `nbf` (#43) * refactor: change createJWT to set iat by default instead of nbf * test: add tests for iat behavior in createJWT * feat: do not set iat if value in payload is null * fix: set payload.iat to undefined instead of null to omit from JWT * fix code style for division * fix code style BREAKING CHANGE: expiresIn option passed to createJWT now calculates exp from nbf instead of iat. * chore: add release automation configuration (#44) * feat: verifyJWT against nbf if present but use iat if not (#45) * feat: verifyJWT against nbf if present but use iat if not * fix: apply skew in the opposite direction when checking exp * test: make some test inputs more clear * test: use hard coded JWTs to test validFrom teimstamp * style: remove unused constants * feat: upgrade to local did resolver (#48) * feat: upgrade to local did resolver * refactor: export resolver so it can be mocked in tests * wip: refactor tests to remove dependency on uport and nacl did resolvers * test: fix tests to verify pregenerated JWT * test: fix hard coded jwts for validFrom timestamp tests * test: fix remaining * test: add tests for normalizeDID * refactor: upgrade ethr-did-resolver to fix imports * refactor: rename variables and clean up async syntax for tests
localredhead
pushed a commit
that referenced
this pull request
Aug 28, 2019
* change iat to nbf * feat: Set `iat` timestamp by default instead of `nbf` (#43) * refactor: change createJWT to set iat by default instead of nbf * test: add tests for iat behavior in createJWT * feat: do not set iat if value in payload is null * fix: set payload.iat to undefined instead of null to omit from JWT * fix code style for division * fix code style BREAKING CHANGE: expiresIn option passed to createJWT now calculates exp from nbf instead of iat. * chore: add release automation configuration (#44) * feat: verifyJWT against nbf if present but use iat if not (#45) * feat: verifyJWT against nbf if present but use iat if not * fix: apply skew in the opposite direction when checking exp * test: make some test inputs more clear * test: use hard coded JWTs to test validFrom teimstamp * style: remove unused constants * feat: upgrade to local did resolver (#48) * feat: upgrade to local did resolver * refactor: export resolver so it can be mocked in tests * wip: refactor tests to remove dependency on uport and nacl did resolvers * test: fix tests to verify pregenerated JWT * test: fix hard coded jwts for validFrom timestamp tests * test: fix remaining * test: add tests for normalizeDID * refactor: upgrade ethr-did-resolver to fix imports * refactor: rename variables and clean up async syntax for tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades
did-resolver
from v0 to v1.Instead of accessing a global
resolve()
function, this module now manages its ownResolver
instance. Consequently,ethr-did-resolver
andhttps-did-resolver
must be included as dependencies, to be registered during construction of the local resolver.Since
uport-did-resolver
andnacl-did-resolver
are not supported by the local resolver, tests that currently depend on them must be refactored or removed.