Package org.forgerock.json.resource
Interface CrestApplication
-
public interface CrestApplication
Declare a CREST Application. This interface binds together the CRESTConnectionFactory
that will be used to connect to the API, and the API ID and Version that will be used when describing it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
allowMultiPartJsonRequests()
Whether the JSON content for a request can be sent in amulipart/form-data
payload.String
getApiId()
Get the API ID, that will be used in theApiDescription
.String
getApiVersion()
Get the API Version, that will be used in theApiDescription
.ConnectionFactory
getConnectionFactory()
Get the connection factory for the application.
-
-
-
Method Detail
-
getConnectionFactory
ConnectionFactory getConnectionFactory()
Get the connection factory for the application.- Returns:
- The factory.
-
getApiId
String getApiId()
Get the API ID, that will be used in theApiDescription
.- Returns:
- The ID.
-
getApiVersion
String getApiVersion()
Get the API Version, that will be used in theApiDescription
.- Returns:
- The Version.
-
allowMultiPartJsonRequests
default boolean allowMultiPartJsonRequests()
Whether the JSON content for a request can be sent in amulipart/form-data
payload. If this is enabled then CREST will look for the first part with aapplication/json
content-type in the multipart body and use that as the request body.SECURITY WARNING: You MUST ensure that adequate CSRF defenses are in place if enabling this option and using cookie-based authentication for web browser clients. Multipart requests are allowed cross-origin with no restrictions by web browsers and do not trigger same-origin or CORS protections.
- Returns:
- whether to allow JSON requests to be sent inside a multipart form-data envelope.
-
-