Generate token
We can authenticate with the registry as a particular entity to perform operations like retrieving, searching, updating and attesting.
Request
To authenticate as an entity, we need to make the following request:
POST
http:/keycloak-url/auth/realms/{realm}/protocol/openid-connect/token
Headers
Name | Type | Description |
---|---|---|
content-type* | String | Set to |
Request Body
Name | Type | Description |
---|---|---|
grant_type* | String | Set to |
client_id* | String | Set to |
username* | String | The |
password* | String | Set to |
Important variables in the response body:
Field | In | Type | Description |
---|---|---|---|
| body |
| Access token used to retrieve/update entity |
| body |
| Number of seconds before the access token will be declared invalid |
| body |
| Should be |
| body |
| Using this token, what information we can access about the entity |
Usage
cURL
HTTPie
{keycloak-url}
is usually http://localhost:8080, and{realm}
is usuallysunbird-rc
.The
{keycloak-url}
is usuallylocalhost:{port}
. The port can be found under thekeycloak
section in thedocker-compose.yml
file. The{realm}
can be found at the top of therealm-export.json
file used to configure keycloak.
Last updated