Skip to content
Snippets Groups Projects

feat/updating

Merged Menou Lucas requested to merge feat/updating into master
3 files
+ 106
54
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 6
3
@@ -75,10 +75,11 @@ User will need to transmit the HTTP Authorization header like this :
Authorization: Bearer <token>
```
Example with curl:
Example with `curl`:
```bash
curl http://localhost:8080/database --header 'Authorizarion: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
$ curl "http://localhost:8080/database" \
--header 'Authorizarion: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
```
## Keycloak
@@ -140,7 +141,9 @@ We can therefore request a token from keycloak via this client. But first we nee
You can now send a request to keycloak to get a token :
```bash
curl -k --data "grant_type=client_credentials&client_id=anis-server&client_secret=**********" http://localhost:8180/auth/realms/anis/protocol/openid-connect/token
$ curl -k \
--data "grant_type=client_credentials&client_id=anis-server&client_secret=**********" \
"http://localhost:8180/auth/realms/anis/protocol/openid-connect/token"
```
Replace `**********` with the secret obtained from the keycloak interface.
Loading