Skip to content

Commit

Permalink
Merge pull request #187 from openid/fix/readme-update
Browse files Browse the repository at this point in the history
readme update for spec version
  • Loading branch information
ogazitt authored Dec 17, 2024
2 parents 8cea29e + 9d2b545 commit 0a9aaca
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions interop/authzen-todo-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ yarn

### Set up the `.env` file

Rename the `.env.example` file to `.env` and update the `AUTHZEN_PDP_URL` variable. The authorization middleware will send AuthZEN requests to `${AUTHZEN_PDP_URL}/access/v1/evaluations`.
Rename the `.env.example` file to `.env` and update the `AUTHZEN_PDP_URL` variable. The authorization middleware will send AuthZEN requests to `${AUTHZEN_PDP_URL}/access/v1/evaluation` (for the `1.0-preview` and `1.0-implementers-draft` spec variations), and to a both `${AUTHZEN_PDP_URL}/access/v1/evaluation` and `${AUTHZEN_PDP_URL}/access/v1/evaluations` (for the `1.1-preview` spec variation).

Optionally, set the `AUTHZEN_PDP_API_KEY` variable if your authorizer needs an API key. You should prefix it with `basic` or `Bearer` as appropriate. If set, the authorization middleware will add the `authorization: ${AUTHZEN_PDP_API_KEY}` header to every authorization request.

Expand Down Expand Up @@ -40,14 +40,39 @@ yarn start

## Run tests against a PDP

Output to console:
First, build the project using `yarn build`.

Help for the `test` script:

```shell
yarn test

Usage: yarn test <authorizer-url> [<spec-version>] [<format>]

<spec-version> should be one of:
1.0-preview
1.0-implementers-draft
1.1-preview

and defaults to 1.0-implementers-draft

<format> should be one of:
console
markdown

and defaults to markdown
```

### Examples

Run the `1.0-implementers-draft` test suite, output to console:

```shell
yarn test https://authorizer.domain.com console
yarn test https://authorizer.domain.com 1.0-implementers-draft console
```

Output as markdown:
Run the `1.1-preview` test suite, output as markdown:

```shell
yarn test https://authorizer.domain.com markdown
yarn test https://authorizer.domain.com 1.1-preview markdown
```

0 comments on commit 0a9aaca

Please sign in to comment.