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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Peeja
Copy link
Contributor

@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?

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