Class IdmService
java.lang.Object
org.forgerock.openig.fapi.apiclient.service.idm.IdmService
The IdmService supports making REST API calls to an IDM instance.
This service provides the base endpoint URI of the IDM instance and known endpoint URIs for particular APIs (such as
managed objects), as well as a Handler to make requests to the IDM instance. The endpointHandler should be
configured to correctly obtain required IDM authorization (e.g. an access_token).
URIs returned by this service are guaranteed to end with a slash, allowing additional path elements to be added
using the URI.resolve(String) method.
{
"type": "IdmService",
"config": {
"baseEndpoint" : Config Expression<URI> [REQUIRED - The base URI of the IDM instance to use.]
"endpointHandler" : Handler [REQUIRED - The Handler to use to make requests on the
managed objects endpoints.]
}
}
The example configuration below illustrates IDM service config:
{
"name" : "IdmService",
"type" : "IdmService",
"config" : {
"baseEndpoint" : "https://&{idmHost}/openidm/",
"endpointHandler" : "IdmEndpointHandler"
}
}
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGet the base endpoint URI of the IDM instance.Get the managed objects endpoint URI.Send a request to IDM using the endpointHandler configured for this service.
-
Method Details
-
getBaseEndpoint
Get the base endpoint URI of the IDM instance. Note: the URI is guaranteed to end with a slash.- Returns:
- the base endpoint URI
-
getManagedObjectsEndpoint
Get the managed objects endpoint URI. Note: the URI is guaranteed to end with a slash.- Returns:
- the managed objects endpoint URI
-
send
Send a request to IDM using the endpointHandler configured for this service.- Parameters:
context- the request contextrequest- the request to send- Returns:
- A Promise representing the response to be returned to the caller.
-