bump go-ucan

This commit is contained in:
Michael Muré
2025-01-16 15:16:01 +01:00
committed by Michael Muré
parent 3b6d70f47a
commit cf3eb1b3f7
7 changed files with 28 additions and 21 deletions

View File

@@ -60,18 +60,18 @@ func (c *Client) PrepareInvoke(ctx context.Context, cmd command.Command, subject
return nil, err
}
invSealed, invCid, err := inv.ToSealed(c.privKey)
invSealed, _, err := inv.ToSealed(c.privKey)
if err != nil {
return nil, err
}
cont := container.NewWriter()
cont.AddSealed(invCid, invSealed)
cont.AddSealed(invSealed)
for bundle, err := range c.pool.GetBundles(proof) {
if err != nil {
return nil, err
}
cont.AddSealed(bundle.Cid, bundle.Sealed)
cont.AddSealed(bundle.Sealed)
}
return cont, nil

View File

@@ -14,6 +14,8 @@ import (
// - issuer: the DID of the client, also the issuer of the invocation token
// - cmd: the command to execute
// - subject: the DID of the resource to operate on, also the subject (or audience if defined) of the invocation token
// The returned delegation chain is ordered starting from the leaf (the one matching the invocation) to the root
// (the one given by the service).
// Note: you can read it as "(issuer) wants to do (cmd) on (subject)".
// Note: the returned delegation(s) don't have to match exactly the parameters, as long as they allow them.
// Note: the implemented algorithm won't perform well with a large number of delegations.

View File

@@ -16,6 +16,8 @@ type DelegationRequester interface {
// - cmd: the command to execute
// - audience: the DID of the client, also the issuer of the invocation token
// - subject: the DID of the resource to operate on, also the subject (or audience if defined) of the invocation token
// The returned delegations MUST be ordered starting from the leaf (the one matching the invocation) to the root
// (the one given by the service).
// Note: you can read it as "(audience) wants to do (cmd) on (subject)".
// Note: the returned delegation(s) don't have to match exactly the parameters, as long as they allow them.
RequestDelegation(ctx context.Context, audience did.DID, cmd command.Command, subject did.DID) (iter.Seq2[*delegation.Bundle, error], error)