Skip to content

Commit

Permalink
rename verifier to authorizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Oct 5, 2021
1 parent a4cddce commit 16357ce
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 70 deletions.
80 changes: 40 additions & 40 deletions samples/v2/README.md
Expand Up @@ -28,12 +28,12 @@ check if resource($0), operation("read"), right($0, "read");
### validation
verifier code:
authorizer code:
```
resource("file1");
```
verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -232,13 +232,13 @@ owner("alice", "file2");
### validation
verifier code:
authorizer code:
```
resource("file2");
operation("read");
```
verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -292,13 +292,13 @@ right("file2", "read");

### validation

verifier code:
authorizer code:
```
resource("file2");
operation("read");
```

verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -344,14 +344,14 @@ check if time($date), $date <= 2018-12-20T00:00:00+00:00;
### validation
verifier code:
authorizer code:
```
resource("file1");
operation("read");
time(2020-12-21T09:23:12+00:00);
```
verifier world:
authorizer world:
```
World {
facts: {
Expand All @@ -374,7 +374,7 @@ result: `Err(["Block(FailedBlockCheck { block_id: 1, check_id: 1, rule: \"check
------------------------------
## verifier scope: test10_verifier_scope.bc
## authorizer scope: test10_authorizer_scope.bc
### token
authority:
Expand All @@ -395,15 +395,15 @@ right("file2", "read");

### validation

verifier code:
authorizer code:
```
resource("file2");
operation("read");
check if right($0, $1), resource($0), operation($1);
```

verifier world:
authorizer world:
```
World {
facts: {
Expand All @@ -424,12 +424,12 @@ World {
}
```

result: `Err(["Verifier(FailedVerifierCheck { check_id: 0, rule: \"check if right($0, $1), resource($0), operation($1)\" })"])`
result: `Err(["Authorizer(FailedAuthorizerCheck { check_id: 0, rule: \"check if right($0, $1), resource($0), operation($1)\" })"])`


------------------------------

## verifier authority checks: test11_verifier_authority_caveats.bc
## authorizer authority checks: test11_authorizer_authority_caveats.bc
### token

authority:
Expand All @@ -443,15 +443,15 @@ right("file1", "read");
### validation
verifier code:
authorizer code:
```
resource("file2");
operation("read");

check if right($0, $1), resource($0), operation($1);
```
verifier world:
authorizer world:
```
World {
facts: {
Expand All @@ -470,7 +470,7 @@ World {
}
```
result: `Err(["Verifier(FailedVerifierCheck { check_id: 0, rule: \"check if right($0, $1), resource($0), operation($1)\" })"])`
result: `Err(["Authorizer(FailedAuthorizerCheck { check_id: 0, rule: \"check if right($0, $1), resource($0), operation($1)\" })"])`
------------------------------
Expand All @@ -489,13 +489,13 @@ check if resource("file1");

### validation for "file1"

verifier code:
authorizer code:
```
resource("file1");
operation("read");
```

verifier world:
authorizer world:
```
World {
facts: {
Expand All @@ -514,13 +514,13 @@ World {
result: `Ok(0)`
### validation for "file2"

verifier code:
authorizer code:
```
resource("file2");
operation("read");
```

verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -565,13 +565,13 @@ check if valid_date($0), resource($0);
### validation for "file1"
verifier code:
authorizer code:
```
resource("file1");
time(2020-12-21T09:23:12+00:00);
```
verifier world:
authorizer world:
```
World {
facts: {
Expand All @@ -594,13 +594,13 @@ World {
result: `Ok(0)`
### validation for "file2"
verifier code:
authorizer code:
```
resource("file2");
time(2020-12-21T09:23:12+00:00);
```
verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -638,12 +638,12 @@ check if resource($0), $0.matches("file[0-9]+.txt");

### validation for "file1"

verifier code:
authorizer code:
```
resource("file1");
```

verifier world:
authorizer world:
```
World {
facts: {
Expand All @@ -661,12 +661,12 @@ World {
result: `Err(["Block(FailedBlockCheck { block_id: 0, check_id: 0, rule: \"check if resource($0), $0.matches(\\\"file[0-9]+.txt\\\")\" })"])`
### validation for "file123"

verifier code:
authorizer code:
```
resource("file123.txt");
```

verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -700,13 +700,13 @@ must_be_present("hello");
### validation
verifier code:
authorizer code:
```

check if must_be_present($0) or must_be_present($0);
```
verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -749,11 +749,11 @@ check1("test");

### validation

verifier code:
authorizer code:
```
```

verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -814,11 +814,11 @@ check if [hex:12ab, hex:34de].contains(hex:34de);
### validation
verifier code:
authorizer code:
```
```
verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -858,12 +858,12 @@ operation($unbound, "read") <- operation($any1, $any2);

### validation

verifier code:
authorizer code:
```
operation("write");
```

verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -905,12 +905,12 @@ operation("read") <- operation($any);
### validation
verifier code:
authorizer code:
```
operation("write");
```
verifier world:
authorizer world:
```
World {
facts: {
Expand Down Expand Up @@ -955,13 +955,13 @@ check if resource($0), operation("read"), right($0, "read");

### validation

verifier code:
authorizer code:
```
resource("file1");
operation("read");
```

verifier world:
authorizer world:
```
World {
facts: {
Expand Down

0 comments on commit 16357ce

Please sign in to comment.