Specification of the Babelfish component
There is an extensive documentation of the Babelfish API available here
The idea of this component is to:
-
Extend the user profile to add: -
babelfish-user-id -
babelfish-organisation-id -
babelfish-client-id (private) -
babelfish-client-secret (private)
-
-
Upon user registration, also register a user linked with Organisation SIB (organisation-id: 811) (server side, signal) -
For that we need to first request an access token using server side settings (BABELFISH_CLIENT_SECRET, BABELFISH_CLIENT_ID) using the token API endpoint -
Once token retrieved, build a request to the create user endpoint to retrieve the user credentials (babelfish-client-id and babelfish-client-secret) and save them into the user -
We should expose a custom endpoint to call babelfish from the server to avoid exposing id/secrets
-
-
Then we can move to displaying the list of existing services in a directory-like style -
Then add a "Register your service" button -
Which redirects to a basic form linked to a custom endpoint -
This service should call our own endpoint which does the following: -
Call the token API endpoint but with the current user babelfish-client-id and babelfish-client-secret to retrieve user specific token -
Call the service registration endpoint with the proper info -
Refresh the list of services to display the new one
-
-
When we click on a given service, we should access the detail
And if we do all that, we look good.