-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements `ucan/revoke` capability and a ucanto server hook that performs the revocation checks. I ended up changing revocations store interface to avoid serializing / deserializing UCN CIDs and to layout data in a way that it's would be more efficient to perform necessary lookups.☹️ I'm not super happy about the way we have to interface with ucanto hook and probably it would make sense to change hook API so it's more like `query` on the revocations store. If we do that we would be able to uplift logic from `utils/revocation.js` into ucanto and simplify things here. That said I it's probably better to land thing here first and do the uplifting if we'll have time to do so. --------- Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
- Loading branch information
Showing
17 changed files
with
865 additions
and
71 deletions.
There are no files selected for viewing
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 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 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ucanRevokeProvider } from './ucan/revoke.js' | ||
import * as API from './types.js' | ||
|
||
/** | ||
* @param {API.UploadServiceContext} context | ||
*/ | ||
export const createService = (context) => { | ||
return { | ||
revoke: ucanRevokeProvider(context), | ||
} | ||
} |
Oops, something went wrong.