Update placeholders for hostname and port (#24153)

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Luca Orlandi 2024-01-11 12:05:05 +01:00 committed by GitHub
parent 9d429400d4
commit d70dd9db67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,12 +14,13 @@ Resource servers can obtain a PAT from {project_name} like any other OAuth2 acce
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'grant_type=client_credentials&client_id=${client_id}&client_secret=${client_secret}' \
"http://localhost:8080{kc_realms_path}/${realm_name}/protocol/openid-connect/token"
"http://${host}:${port}{kc_realms_path}/${realm_name}/protocol/openid-connect/token"
----
The example above is using the *client_credentials* grant type to obtain a PAT from the server. As a result, the server returns a response similar to the following:
```json
[source,json]
----
{
"access_token": ${PAT},
"expires_in": 300,
@ -30,7 +31,7 @@ The example above is using the *client_credentials* grant type to obtain a PAT f
"not-before-policy": 0,
"session_state": "ccea4a55-9aec-4024-b11c-44f6f168439e"
}
```
----
[NOTE]
{project_name} can authenticate your client application in different ways. For simplicity, the *client_credentials* grant type is used here,