Package org.forgerock.json.resource
Interface CrestApplication
-
public interface CrestApplicationDeclare a CREST Application. This interface binds together the CRESTConnectionFactorythat 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 booleanallowMultiPartJsonRequests()Whether the JSON content for a request can be sent in amulipart/form-datapayload.StringgetApiId()Get the API ID, that will be used in theApiDescription.StringgetApiVersion()Get the API Version, that will be used in theApiDescription.ConnectionFactorygetConnectionFactory()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-datapayload. If this is enabled then CREST will look for the first part with aapplication/jsoncontent-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.
-
-