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 pull request partially implements capability validation on the server. Here is rough overview of the changes:
Server.create
now requiresid: Identity
field and will check validate that received invocations have it as audience.Server.create
now takes optionalcanIssue
,my
,resolve
andauthority
fields and passes them viacontext
argument so that they can be passed to validator'saccess
function. If not provided sensible defaults are derived.handler.js
module on the server exportsprovide(capability, handler)
function which can be used to bind capability parser with it's handler. This could be used to simplify UCAN validation until better API is added. (see handler.spec.js for the examples)URI
parser thingy got replaced with slightly differentURI
thingy. Now you can usewith: URI
when you don't care about protocol and you have to useURI.match({ protocol: 'did:' })
when you want URIs with a specific protocol.Link
decoder had been added, which is roughly equivalent ofURI
decoder but forCID
s. (I found myself writing it all over the place and it made sense to just have a thing out of the box).@ucanto/core
to avoid depending on both from everywhere. This way less things can get out of sync.