Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Delegate as an easy method for extending the delegation chain #36

Open
smoyer64 opened this issue Oct 2, 2024 · 0 comments
Open
Labels
enhancement New feature or request enhancement-delegation New feature for delegation tokens v1.0.0-rc.1

Comments

@smoyer64
Copy link
Collaborator

smoyer64 commented Oct 2, 2024

Given I have a UCAN delegation token with (one of?) my DID(s) in the aud field, add a Delegate method that makes it easier to continue the delegation chain. This can be accomplished but the New constructor but almost every field must then be copied by the library user.

The method signature would be something like:

func (t *Token) Delegate(privKey crypto.PrivKey, aud did.DID, opts ...DelegateOption) (*Token, error)

And DelegateOption would include the following implementations:

  • WithAttenuatedCommand
  • `WithAttenuatedPolicy
  • WithAdditionalPolicyPredicates
  • WithoutInheritedPolicy
@smoyer64 smoyer64 added enhancement-delegation New feature for delegation tokens v1.0.0-rc.1 labels Oct 2, 2024
@smoyer64 smoyer64 added the enhancement New feature or request label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request enhancement-delegation New feature for delegation tokens v1.0.0-rc.1
Projects
None yet
Development

No branches or pull requests

1 participant