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

[WIP] API Rework #554

Closed
wants to merge 80 commits into from
Closed

Conversation

derekpierre
Copy link
Member

@derekpierre derekpierre commented Jul 19, 2024

Type of PR:

  • Bugfix
  • Feature
  • Documentation
  • Other

Required reviews:

  • 1
  • 2
  • 3

What this does:
Based over #547

  • Rework of decryption API to use ConditionContext instead of splitting up params for authProvider and customParameters.
  • Allow ConditionContext to be populated by developers with authProviders and customParameters before being used for decryption
  • Reduce parameters used in calls for decryption -> retrieve flow. Instead only obtain the ritual from the ritual id when the values are actually needed.

Issues fixed/closed:

  • Fixes #...

Why it's needed:

Explain how this PR fits in the greater context of the NuCypher Network.
E.g., if this PR address a nucypher/productdev issue, let reviewers know!

Notes for reviewers:

What should reviewers focus on?
Is there a particular commit/function/section of your PR that requires more attention from reviewers?

piotr-roslaniec and others added 30 commits July 2, 2024 10:37
Modify some default values used for creating SIWE message, including use a random nonce.
Fix the URI used for EIP4361 message to be properly formed - it caused an invalid SIWE message to be created.
…61 to be more accurate and in line with EIP712 auth signature call. This can perhaps be an interface/base class method in the future.

Run linter.
@derekpierre derekpierre self-assigned this Jul 22, 2024
@@ -202,6 +185,7 @@ export const isAuthorized = async (
messageKit,
);

// TODO is this still valid and actually needed? should we remove this?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worthwhile to revisit it post release of @nucypher/contracts - IIRC, there were some changes to EncryptorAllowlist contract, etc.

So we may want to revisit how (if) to expose this logic in taco-web.

Copy link
Contributor

@piotr-roslaniec piotr-roslaniec left a comment

Choose a reason for hiding this comment

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

LGTM, please tag me for a re-review whenever

derekpierre added a commit to derekpierre/taco-web that referenced this pull request Jul 22, 2024
…et the ritual so early; obtaining it later saves us from passing additional parameters.
Allow Context to be created with a condition, and subsequently populated with authProviders and customParameters.
Make :userAddressExternalEIP4361 a reserved context variable because the context will use the provided authProviders to populate its (and :userAddress) values in the overall context used for decryption.
… replaces authProvider and customParmeters since those are now encompassed in the context itself.
…common elements for both ei4361 provider and single sign-on provider.

Move user address context variable for external eip4361 to taco-auth as well.
Update relevant imports.
…d of directly passing auth provider.

Expose USER_ADDRESS_PARAM* constants from taco for now.
@derekpierre derekpierre deleted the branch nucypher:epic-auth July 30, 2024 12:33
derekpierre added a commit to derekpierre/taco-web that referenced this pull request Jul 30, 2024
@derekpierre derekpierre mentioned this pull request Jul 30, 2024
7 tasks
derekpierre added a commit to derekpierre/taco-web that referenced this pull request Jul 31, 2024
derekpierre added a commit to derekpierre/taco-web that referenced this pull request Aug 15, 2024
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.

None yet

3 participants