Authentication
Create client in Keycloak
- Login to the administration console with the admin user.
- Go to Clients > Create.
- Enter
ClientID(of your own choosing) called <CLIENT_ID>. - Click
Save. - In Settings for this newly created client:
- Disable Standard Flow Enabled.
- Disable Direct Access Grants Enabled.
- Set Access Type to
confidential. - Enable Service Accounts Enabled.
- Click
Save.
- In Service Account Roles for this newly created client:
- In Client Roles select appropriate role as described in the table in section REST interfaces in Operations.
- Add role
usage-allowedto Assigned Roles.
- In Credentials for this newly created client, copy secret to Clipboard (called <CLIENT_SECRET>).
Get Token
| Name | Value |
|---|---|
| Token Name | Choose any |
| Grant Type | Client Credentials |
| Access Token URL | server:port/auth/realms/trustcenter/protocol/openid-connect/token |
| Client ID | <CLIENT_ID> |
| Client Secret | <CLIENT_SECRET> |
| Scope | - |
| Client Authentication | Send as Basic Auth header |