Skip to content

jmix-projects/jmix-restds-compatibility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jmix REST DataStore Compatibility Sample

The Service app is based on Jmix 1.6 and exposes Customer entity through the Generic REST.

The Client app is based on Jmix 2.5 and consumes the Service's Customer data using REST DataStore.

Running the sample

  1. Open the client-app and service-app folders as separate projects in the IDE. Due to different Jmix versions they cannot work in a single composite project.
  2. Run the service-app application.
  3. Open http://localhost:8081/ in your browser, login as admin / admin.
  4. Create a new User with the integration name and integration password. Assign the IntegrationRole to this user.
  5. Run the client-app application.
  6. Open http://localhost:8080/ in your browser, login as admin / admin.
  7. Now you can manage Customers and Regions both in the Client and in the Service applications.

Implementation details

  1. Jmix 1.x REST API supports only the Password grant, so the Client authenticates in the Service as a special "integration user". This user must be created in the Service with minimal permissions required for the integration.

  2. The Client app uses the standard restds_RestPasswordAuthenticator, but custom RestTokenHolder implementation that stores the token of the integration user: IntegrationTokenHolder. All Service invocations use the same token.

  3. The IntegrationInitializer class authenticates in the Service on the Client application start using the "integration user" credentials obtained from the environment.

  4. Jmix 1.x uses non-standard path for obtaining tokens, so the Client includes the following property: serviceapp.tokenPath=/oauth/token

  5. The jmix.restds.authentication-provider-store property that provides authentication of the current user in the service must not be present the environment.

  6. Jmix 1.x REST API does not support inline fetch plans. Therefore, the Service and the Client define the same customer-with-region fetch plan in their fetch-plans.xml files. This fetch plan's name is used in the Client views for the Customer entity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors