derekpierre
392506648d
Ensure that issued-at value is not in the future.
...
Add respective test.
2024-07-24 11:20:12 -04:00
derekpierre
607e667350
Update test for EIP712 authentication when address from signature does not match expected address.
2024-07-24 10:54:38 -04:00
derekpierre
3853075407
Update EIP4361 authentication tests now that issued_at is the sole reference point for checking freshness.
2024-07-24 10:54:22 -04:00
derekpierre
796c29377d
Update use of SiweMessage object given breaking changes in updated siwe library.
...
Update tests accordingly including testing did URIs.
2024-07-16 09:38:15 -04:00
derekpierre
167669c3c9
Separate fixtures for EIP4361 and EIP712 messages, and update tests accordingly. This will make things easier once we fully remove EIP712 support in the future.
2024-07-04 13:54:17 -04:00
derekpierre
22bf9df1ad
Removal of unnecessary/no longer needed special context variables for EVM wallet authentication. These were never released publicly (local to v7.4.x branch) so no compatibility concerns removing them.
2024-07-04 13:53:22 -04:00
derekpierre
28df8b851f
Respond to RFCs for #3513 .
2024-06-24 08:10:36 -04:00
derekpierre
184de55bfc
Handle context variable for EIP4361 auth signature, where the SIWE message and signature were passed through from the 3rd party app, and not created by TACo itself.
2024-06-21 12:17:00 -04:00
derekpierre
59d42b7b2e
Some code reorg that leaves space for additional authentication types other than EVM.
2024-06-06 15:48:45 -04:00
derekpierre
0214471462
Allow any valid user authentication scheme for `:userAddress` context variable processing.
2024-05-29 09:46:37 -04:00
derekpierre
fa47141801
Update context tests to use auth message fixture to generate customized context with relevant user address context variables.
2024-05-28 14:31:22 -04:00
derekpierre
a3f1328a02
Update authentication tests based on rename of auth scheme to EIP4361 from SIWE.
2024-05-28 14:31:21 -04:00
derekpierre
ff84b0f40c
Move user address tests out of test_conditions and into test_context module.
2024-05-28 14:31:17 -04:00
derekpierre
f89cffd328
Adjust freshness check to occur after message verification, and skip if "not-before" is specified in the message.
2024-05-28 10:49:36 -04:00
derekpierre
0e83c1c158
Add a default freshness check for SIWE messages - this prevents perpetual reuse of the same SIWE message.
...
Improve auth exception messages and update tests to check for relevant messages.
Add tests for stale SIWE messages.
2024-05-16 19:46:42 -04:00
derekpierre
92b06eeb6e
Generate a fresh SIWE signature for tests.
2024-05-16 18:40:09 -04:00
derekpierre
d699c93bf9
Make auth tests more maintainable by improving fixture parameter usage.
2024-05-15 16:52:06 -04:00
derekpierre
1a8d05a092
Add testing module for Auth/AuthScheme functionality.
2024-05-15 16:39:22 -04:00
derekpierre
363eb3975c
Always raise ConditionEvalError (previously EvalError) instead of returning then raising.
...
Update tests.
2023-12-01 13:59:03 -05:00
David Núñez
0f8ea5e067
Unit tests for context resolution stuff
2023-11-16 16:45:11 +01:00
David Núñez
4e6af23e81
Fix unit test for context variable resolution
2023-11-16 16:45:11 +01:00
David Núñez
05d151ad81
non-ascii characters are not valid context variables
2023-11-16 16:45:11 +01:00
David Núñez
0c7ebaf943
First pass at unit-testing context variable name validation. Currently fails!
2023-11-16 16:45:11 +01:00
derekpierre
95bca154fc
Fix test - remove not applicable case for Python API.
2023-11-08 11:51:29 +01:00
derekpierre
099a72e39e
Be more strict with chain field in Schema.
...
Update tests accordingly.
2023-11-08 11:51:29 +01:00
derekpierre
a620a2d86f
Be more eager validating return value schema.
...
Ensure index is non-negative integer.
2023-11-08 11:51:29 +01:00
derekpierre
bf328db437
Add unit tests for time condition negative validation of return value type.
2023-10-31 11:43:19 +01:00
derekpierre
b68652422e
Split out validity unit tests into specific condition class tests.
...
Add tests for more invalid cases across condition types.
Improve tests to ensure that expected message is raised in exceptions.
2023-10-31 11:43:19 +01:00
derekpierre
27c9306f0e
Improve naming for context var testing.
2023-10-31 11:43:19 +01:00
derekpierre
4390525197
Add tests for function abi validation for ContractCondition.
2023-10-31 11:43:19 +01:00
derekpierre
0ebcb6ed70
Add test when provided chain id is not an int.
2023-10-31 11:43:19 +01:00
derekpierre
99644475ea
Add testing with/without context var only, and both for more robust testing.
...
Allowing with context var only only allows for testing mismatched expected types when context var is populated at decryption time since it couldn't be checked at condition initialization.
2023-10-31 11:43:19 +01:00
derekpierre
0abebc8546
Add test for unexpected type when comparator value is a sequence.
2023-10-31 11:43:19 +01:00
derekpierre
207bc5329b
Remove unnecessary utility function for `validate_condition_lingo`; instead ConditionLingo.from_dict() can be used.
2023-10-31 11:43:19 +01:00
derekpierre
ccd214d0f7
Improve testing of negative/failure case for ConditionLingo.from_json.
2023-10-31 11:43:19 +01:00
derekpierre
e77b92a223
Add test where return value index is not applicable for data returned from contract call.
2023-10-31 11:43:19 +01:00
derekpierre
210a603c9d
Handle bytes when nested within lists/sub-lists comparator values/results.
2023-10-26 20:22:28 +02:00
derekpierre
51bb2d5ca2
Test cleanup - don't repeat entire condition for certain more invloved tests eg. tuples.
2023-10-26 20:22:28 +02:00
derekpierre
45e9096c07
Add tests for bytes abi output types and comparing it to hex comparator values.
2023-10-26 20:22:28 +02:00
derekpierre
92e8131de7
Properly handle non-JSON serializable value where possible or raise exception on creation of ReturnValueTest.
2023-10-26 20:22:28 +02:00
derekpierre
53780b36d2
Simple code cleanup.
2023-10-26 20:22:28 +02:00
derekpierre
2ed2e5c633
Add tests for tuple processing logic for both verification and execution.
2023-10-26 20:22:28 +02:00
derekpierre
2fa499ef04
Add tests to account for ABI types.
2023-10-26 20:22:28 +02:00
derekpierre
2a3f83440f
Add tests for proper handling of bytes, validating sanitization of values, and handling of tuples.
...
Additional test cleanup.
2023-10-26 20:22:28 +02:00
derekpierre
4844c7021d
Ensure that condition_type is properly validated.
...
Add tests.
2023-10-19 10:10:08 -04:00
derekpierre
9486f52c44
Fix schema validation - any validation of schema should only raise ValidationErrors.
...
Add tests.
2023-10-19 10:09:14 -04:00
derekpierre
50a325d06b
Add contract condition type to compound condition for additional testing.
2023-10-18 20:39:22 -04:00
derekpierre
4c6a0be937
Use ConditionType enum values instead of constants across codebase.
2023-10-18 20:25:56 -04:00
derekpierre
94d9dccbd4
Add tests for not logical condition logic.
2023-10-18 19:45:53 -04:00
Piotr Roslaniec
c19d97b39f
apply pr suggestions
2023-08-23 20:12:22 +02:00