Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion biscuit-auth/examples/testcases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1991,11 +1991,13 @@ fn expressions_v4(target: &str, root: &KeyPair, test: bool) -> TestResult {

let biscuit = biscuit!(
r#"
//bool not strict equal
check if true !== false;
//integer not strict equal
check if 1 !== 3;
//integer bitwise and or xor
check if 1 | 2 ^ 3 === 0;
// string not strict equal
//string not strict equal
check if "abcD12x" !== "abcD12";
//date not strict equal
check if 2022-12-04T09:46:41+00:00 !== 2020-12-04T09:46:41+00:00;
Expand Down
4 changes: 3 additions & 1 deletion biscuit-auth/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2460,6 +2460,7 @@ public keys: []
block version: 4

```
check if true !== false;
check if 1 !== 3;
check if 1 | 2 ^ 3 === 0;
check if "abcD12x" !== "abcD12";
Expand All @@ -2476,7 +2477,7 @@ allow if true;
```

revocation ids:
- `117fa653744c859561555e6a6f5990e3a8e7817f91b87aa6991b6d64297158b4e884c92d10f49f74c96069df722aa676839b72751ca9d1fe83a7025b591de00b`
- `9402c07923aa33bc911de80e61f388f5c4533e6b36e45317dc1db1e6bcc7664ed0c1c504d0ca8925208008961d95bbdbc36f6e3d91b3173369cc19ed625e9a0c`

authorizer world:
```
Expand All @@ -2494,6 +2495,7 @@ World {
"check if 1 | 2 ^ 3 === 0",
"check if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z",
"check if hex:12abcd !== hex:12ab",
"check if true !== false",
"check if {1, 4} !== {1, 2}",
],
},
Expand Down
5 changes: 3 additions & 2 deletions biscuit-auth/samples/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,7 @@
],
"public_keys": [],
"external_key": null,
"code": "check if 1 !== 3;\ncheck if 1 | 2 ^ 3 === 0;\ncheck if \"abcD12x\" !== \"abcD12\";\ncheck if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z;\ncheck if hex:12abcd !== hex:12ab;\ncheck if {1, 4} !== {1, 2};\n",
"code": "check if true !== false;\ncheck if 1 !== 3;\ncheck if 1 | 2 ^ 3 === 0;\ncheck if \"abcD12x\" !== \"abcD12\";\ncheck if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z;\ncheck if hex:12abcd !== hex:12ab;\ncheck if {1, 4} !== {1, 2};\n",
"version": 4
}
],
Expand All @@ -2269,6 +2269,7 @@
"check if 1 | 2 ^ 3 === 0",
"check if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z",
"check if hex:12abcd !== hex:12ab",
"check if true !== false",
"check if {1, 4} !== {1, 2}"
]
}
Expand All @@ -2282,7 +2283,7 @@
},
"authorizer_code": "allow if true;\n",
"revocation_ids": [
"117fa653744c859561555e6a6f5990e3a8e7817f91b87aa6991b6d64297158b4e884c92d10f49f74c96069df722aa676839b72751ca9d1fe83a7025b591de00b"
"9402c07923aa33bc911de80e61f388f5c4533e6b36e45317dc1db1e6bcc7664ed0c1c504d0ca8925208008961d95bbdbc36f6e3d91b3173369cc19ed625e9a0c"
]
}
}
Expand Down
Binary file modified biscuit-auth/samples/test028_expressions_v4.bc
Binary file not shown.
Loading