Skip to content

Commit 4ea3476

Browse files
committed
edit
1 parent 93f48d1 commit 4ea3476

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

guides/security/authentication.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,19 @@ As the mock user authentication is active, all (CAP) endpoints are [authenticate
117117
To simplify the development scenario, you can set <Config java>cds.security.authentication.mode = "model-relaxed"</Config> to deactivate authentication of endpoints derived from unrestricted CDS services.
118118
:::
119119

120-
If you stay with the standard authentication mode, sending the OData request `curl http://localhost:8080/odata/v4/CatalogService/Books --verbose`
121-
results in a `401` error response from the server, indicating that the anonymous user has been rejected due to missing authentication.
120+
If you stay with the standard authentication mode, sending the OData request results in a `401` error response from the server, indicating that the anonymous user has been rejected due to missing authentication.
121+
122+
```sh
123+
curl http://localhost:8080/odata/v4/CatalogService/Books --verbose
124+
```
125+
122126
This is the case for all endpoints including the web application page at `/index.html`.
123127

124-
Mock users require **basic authentication**, hence sending the same request on behalf of mock user `admin` (password: `admin`) with `curl http://admin:admin@localhost:8080/odata/v4/CatalogService/Books` returns successfully (HTTP response `200`).
128+
Mock users require **basic authentication**, hence sending the same request on behalf of mock user `admin` (password: `admin`) returns successfully (HTTP response `200`).
129+
130+
```sh
131+
curl http://admin:admin@localhost:8080/odata/v4/CatalogService/Books
132+
```
125133

126134
</div>
127135

@@ -140,11 +148,12 @@ curl http://localhost:4004/odata/v4/admin/Books --verbose
140148
This results in a `401` error response from the server indicating that the anonymous user has been rejected due to missing authentication.
141149
This is true for all endpoints including the web application page at `/index.html`.
142150

143-
Mock users require **basic authentication**, hence sending the same request on behalf of mock user `alice` (no password) with
151+
Mock users require **basic authentication**, hence sending the same request on behalf of mock user `alice` (no password) returns successfully (HTTP response `200`).
152+
144153
```sh
145154
curl http://alice:@localhost:4004/odata/v4/admin/Books
146155
```
147-
returns successfully (HTTP response `200`).
156+
148157

149158
</div>
150159

0 commit comments

Comments
 (0)