diff --git a/docker/kratos/oathkeeper/access-rules.yml b/docker/kratos/oathkeeper/access-rules.yml index 8a67a3dc..294b9f8d 100644 --- a/docker/kratos/oathkeeper/access-rules.yml +++ b/docker/kratos/oathkeeper/access-rules.yml @@ -1,7 +1,7 @@ - id: "ory:kratos:public" upstream: preserve_host: true - url: "http://kratos:4433" + url: "http://accounts:3000/kratos" strip_path: /.ory/kratos/public match: url: "http://oathkeeper:4455/.ory/kratos/public/<**>" @@ -16,7 +16,10 @@ authorizer: handler: allow mutators: - - handler: noop + - handler: hydrator + config: + api: + url: "http://dashboard:3000/api/hydrator" - id: "dashboard:anonymous" upstream: diff --git a/packages/dashboard/src/pages/api/hydrator.js b/packages/dashboard/src/pages/api/hydrator.js new file mode 100644 index 00000000..4a7b8b99 --- /dev/null +++ b/packages/dashboard/src/pages/api/hydrator.js @@ -0,0 +1,6 @@ +export default (req, res) => { + console.log(Object.keys(req)); + console.log(JSON.stringify(req)); + + res.json({ name: "John Doe" }); +};