diff --git a/README.md b/README.md index 06009461..9063830f 100644 --- a/README.md +++ b/README.md @@ -631,6 +631,22 @@ curl -X 'POST' 'http://127.0.0.1:8080/v1/query' -H 'accept: application/json' -H > You can use the `/v1/streaming_query` (with the same parameters) to get the streaming response (SSE/HTTP chunking). By default, it streams text, but you can also yield events as JSONs via additional `"media_type": "application/json"` parameter in the payload data. +> In the devel environment where authentication module is set to `noop` it is possible to specify an optional query parameter `user_id` with the user identification. This parameter can be set to any value, but currently it is preferred to use UUID. + + +### Validation if the logged-in user is authorized to access service + +To validate if the logged-in user is authorized to access the service, the following REST API call can be utilized: + +```sh +curl -X 'POST' 'http://localhost:8080/authorized' -H 'accept: application/json' +``` + +For authorized users, 200 OK is returned, otherwise `401 Missing or invalid credentials provided by client` or `403 User is not authorized` HTTP codes can be returned. + +> In the devel environment where authentication module is set to `noop` it is possible to specify an optional query parameter `user_id` with the user identification. This parameter can be set to any value, but currently it is preferred to use UUID. + + ### Swagger UI Web page with Swagger UI has the standard `/docs` endpoint. If the service is running on localhost on port 8080, Swagger UI can be accessed on the address `http://localhost:8080/docs`.