OpenID Connect Keystores Endpoint
The OpenID Connect Keystores Endpoint can be used to create, read, and update OIDC keystore definitions that are stored in Smile CDR.
This method will fetch all keystores stored in the system.
Request:
GET http://localhost:9000/keystores/
You may also add the following URL parameters:
pageIndex=[index]
– The index of the page to return to the user (0 is the first page)pageSize=[size]
– The size of the page to return to the user (e.g. 100)Response:
This operation returns a JSON document object of type OAuth2Keystores. This object will then contain individual definitions of the type OAuth2Keystore.
Note that actual keystore keys are hidden in response objects. Only the keystore ID and the file path (if present) will be returned.
Example:
{
"keystores": [
{
"keystoreId": "default-keystore",
"filePath": "classpath:/smilecdr-demo.jwks"
}
]
}
This method will fetch a single keystore stored in the system.
Request:
GET http://localhost:9000/keystores/[keystore_id]
Response:
This operation returns a JSON document object of type OAuth2Keystore.
Note that actual keystore keys are hidden in response objects. Only the keystore ID and the file path (if present) will be returned.
Error Response:
If the keystore does not exist:
{
"statusCode": 404,
"messages": [
{
"message": "No Keystore with id [keystore_id]"
}
]
}
This method will create a new keystore definition.
Request:
POST http://localhost:9000/keystores/
This operation accepts a JSON document object of type OAuth2Keystore. Example:
{
"keystoreId": "default-keystore",
"filePath": "classpath:/smilecdr-demo.jwks"
}
Response:
This operation returns a JSON document object of type OAuth2Keystore with HTTP status 201 (Created). Example:
{
"keystoreId": "default-keystore",
"filePath": "classpath:/smilecdr-demo.jwks"
}
This method update an existing server definition.
Request:
PUT http://localhost:9000/keystores/[keystore_id]
This operation accepts a JSON document object of type OAuth2Keystore. Example:
{
"keystoreId": "default-keystore",
"filePath": "classpath:/smilecdr-demo.jwks"
}
Response:
This operation returns a JSON document object of type OAuth2Keystore. Example:
{
"keystoreId": "default-keystore",
"filePath": "classpath:/smilecdr-demo.jwks"
}
Error Responses:
If the keystore ID in the URL does not match the keystore ID in the request body:
{
"statusCode": 400,
"messages": [
{
"message": "Cannot update keystore with id [keystore_id] with id [url_keystore_id]"
}
]
}
If the keystore does not exist:
{
"statusCode": 404,
"messages": [
{
"message": "Unknown Keystore Id [keystore_id]"
}
]
}
This method deletes an existing keystore definition from the system. This operation is permanent and cannot be undone. Ensure that no modules are actively using the keystore before deletion.
Request:
DELETE http://localhost:9000/keystores/[keystore_id]
Note the following path element:
keystore_id
– The unique identifier of the keystore to delete.Response:
The server will respond with an HTTP 204 (No Content) status if the deletion is successful.
Error Response:
If the keystore does not exist:
{
"statusCode": 404,
"messages": [
{
"message": "Unknown Keystore Id [keystore_id]"
}
]
}
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.