From 2d0df2d4ef1a7b3a5dcccd7e85cf3393326fbb1f Mon Sep 17 00:00:00 2001 From: Mat <7613997+Ak1r0@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:31:53 +0100 Subject: [PATCH] Doc generate client : allow access to "/context" for securised api --- create-client/index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/create-client/index.md b/create-client/index.md index 26893509395..c5546b67f8c 100644 --- a/create-client/index.md +++ b/create-client/index.md @@ -36,3 +36,18 @@ Create Client works especially well with APIs built with the [API Platform](http - Integration with [Tailwind CSS](https://tailwindcss.com) (NextJS) or [Bootstrap](https://getbootstrap.com/) and [FontAwesome](https://fontawesome.com/) (other generators) - Integration with [React Native Elements](https://react-native-training.github.io/react-native-elements/) - Accessible to people with disabilities ([ARIA](https://www.w3.org/WAI/intro/aria) support in webapps) + +## Security + +If you use a securised api like described in the [JWT section](https://api-platform.com/docs/core/jwt/) you will have to allow a public access to "/contexts" path. + +```yaml +# api/config/packages/security.yaml +security: + # Easy way to control access for large sections of your site + # Note: Only the *first* access control that matches will be used + access_control: + - { path: ^/contexts, roles: PUBLIC_ACCESS } +``` + +