Closed matheus23 closed 2 years ago
Don't you like it when your TODO list grows while you're chasing TODO items? :P
UCAN
instead of Ucan
Web.Ucan.Potency
ResourceSemantics
to DelegationSemantics
fission-core
(abstract over fission-specific Fact
s, Resource
s, Potency
s) & move them to hs-ucan
It seemed like the cachix/install-nix-action@v13
was broken. I upgraded it to v16
, and that seems to be running fine :+1:
I've changed the base branch to ucan-upgrade
as per discussion with @expede: We'll keep that as another branch running alongside main while we're upgrading hs-ucan, so we can merge partially-typechecking PRs while stuff is in flux.
We keep main clean so we can hotfix stuff.
Eventually ucan-upgrade
will get merged into main.
This is work on #561
To do this, some dependencies on fission-specific UCAN stuff had to be broken up. The main point here being the definition of
Fact
and the resource typeScope Resource
. (In hindsight I thinkScope
actually still belongs to hs-ucan, but now I've already done it this way, and we'll have to change these parts of the code when supporting the new UCAN version anyway.)That means that we can't directly run
JWT.check
and know how to check delegation validity in UCANs. So I've abstracted that logic out into aResourceSemantics
class:(Which is structurally equivalent to something like a
PartialOrder
typeclass, but I like giving it a dedicated name.)There are still some parts that need work.
Error.AlreadyExists
should be a hs-ucan module..Internal
modules again, making sure that we really only have modules in there that make senseI think I want to introduce aMy current thinking is: Let's introduce that file once we have something to put into it.Web.JWT
module, which reexportsWeb.JWT.Types
.newtype JWT
andnewtype Proof
or both are type aliases. But if I didn't type-aliasProof
, I'd be taking non-newtyped proofs out of JWTs and just re-newtype them. I'm thinking that this might get obsolete when I start working on hs-ucan anyway. I have some recursion-schemes thoughts.Web.JWT.*
for the hs-ucan stuff. I'd love some input. MaybeWeb.Ucan.*
?Proof.Resolver
class, which now has 3 type parameters instead of one.And a final TODO item unrelated to hs-ucan or fission-core: