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

[DRAFT] feat: Composable Validation #82

Closed
wants to merge 8 commits into from

Conversation

fangting-alchemy
Copy link
Collaborator

@fangting-alchemy fangting-alchemy commented Jun 21, 2024

Checkout doc here

WebAuthn lib base

Summary

This PR demonstrate a stateless validation system where validators are composable. It consists of two components: Validation plugin functions and stateless validators.
Validation plugins manage MA account’s authorization and authentication rules.
Stateless Validators validate inputs based on root rules of the validation scheme.
See more details in the above Google doc.

Note: it does not include WebAuthn Validator tests here due to time and scope.

@fangting-alchemy fangting-alchemy force-pushed the fangting/comp-valid branch 3 times, most recently from c9e7f05 to 8aa1f09 Compare June 21, 2024 23:39
@fangting-alchemy fangting-alchemy force-pushed the fangting/comp-valid branch 2 times, most recently from f0a899c to 68a8f3a Compare June 24, 2024 18:33
sender != msg.sender
&& (
_owners[msg.sender].data.length == 0
|| sender != abi.decode(_owners[msg.sender].data, (address))
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not guaranteed to have this abi encoding though, right? For example for WebAuthnValidator has a different encoding to ECDSA one which is assumed here

@fangting-alchemy fangting-alchemy deleted the fangting/comp-valid branch July 26, 2024 20:12
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.

3 participants