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

refactor: Avoid conflation of Space and Account #1545

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Conversation

Peeja
Copy link
Member

@Peeja Peeja commented Sep 6, 2024

  • space.signer.withDID(account) gives us a Signer with the Space's key, but which reports the Account's DID. It looks like this might have been needed at some point when this thing was actually used to sign something. But as of now, we don't need a Signer, just a DID, and a did:mailto: is fine. So, simplify this.

  • This was being passed as the agent, but it's not an Agent. createAuthorization() doesn't need an Agent, it needs an audience. In some cases that's an Agent, in some cases it's an Account. This changes the name to clarify.

* `space.signer.withDID(account)` gives us a Signer with the Space's
  key, but which reports the Account's DID. It looks like this might
  have been needed at some point when this thing was actually used to
  sign something. But as of now, we don't need a *Signer*, just a DID,
  and a `did:mailto:` is fine. So, simplify this.

* This was being passed as the `agent`, but it's not an Agent.
  `createAuthorization()` doesn't need an Agent, it needs an *audience*.
  In some cases that's an Agent, in some cases it's an Account. This
  changes the name to clarify.
@Peeja Peeja requested a review from alanshaw September 6, 2024 15:25
We already have it in `packageManager`.
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can we have a separate PR for the actions changes next time please?

@Peeja Peeja merged commit 06fc93f into main Oct 11, 2024
10 checks passed
@Peeja Peeja deleted the audience-not-agent branch October 11, 2024 14:24
@Peeja
Copy link
Member Author

Peeja commented Oct 11, 2024

Whoops, lost track of this PR, but it still seems valid.

can we have a separate PR for the actions changes next time please?

Yeah, good call, not sure why these ended up together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants