From b9cfe131fd8def8a0bd04ffae4f4810148cc63c1 Mon Sep 17 00:00:00 2001 From: Emmanuel Gautier Date: Sat, 15 Apr 2023 12:01:43 +0200 Subject: [PATCH] docs: update cli readme example --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ed29c81..e7bc474 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ This contract defines a single endpoint at /users/{id} that returns a user objec To generate rules using the tool, simply run the command in your terminal with the appropriate arguments. ```shell -openapi-oathkeeper -f test/stub/sample.openapi.json +openapi-oathkeeper generate -f test/stub/sample.openapi.json --allowed-audiences "openidconnect=https://api.cerberauth.com/" ``` Here is a Ory Oathkeeper rules output @@ -115,7 +115,7 @@ Here is a Ory Oathkeeper rules output "methods": [ "GET" ], - "url": "https://api.example.com/users/<.*>" + "url": "<^(https://api\\.example\\.com)(/users/(.+)/?)$>" }, "authenticators": [ { @@ -130,6 +130,9 @@ Here is a Ory Oathkeeper rules output "required_scope": [ "read:user", "write:user" + ], + "target_audience": [ + "https://api.cerberauth.com/" ] } } @@ -144,7 +147,12 @@ Here is a Ory Oathkeeper rules output "config": null } ], - "errors": null, + "errors": [ + { + "handler": "json", + "config": null + } + ], "upstream": { "preserve_host": false, "strip_path": "",