(WIP) refine the token constructors:

- for invocation, reorder the parameters for a more "natural language" mental model
- for delegation, make "subject" a required parameter to avoid make powerline by mistake
- for delegation, implement powerline
This commit is contained in:
Michael Muré
2024-12-09 20:39:47 +01:00
parent 80c2d60ab3
commit 0592717637
10 changed files with 58 additions and 44 deletions

View File

@@ -16,7 +16,7 @@ func TestSealUnsealRoundtrip(t *testing.T) {
privKey, iss, sub, cmd, args, prf, meta, err := setupExampleNew()
require.NoError(t, err)
tkn1, err := invocation.New(iss, sub, cmd, prf,
tkn1, err := invocation.New(iss, cmd, sub, prf,
invocation.WithArgument("uri", args["uri"]),
invocation.WithArgument("headers", args["headers"]),
invocation.WithArgument("payload", args["payload"]),