02-14-2023 07:59 AM
I would like to use the user set in "application.properties" as the application user to generate individual user tickets using the rest api service "generateTicket".
To make a simple use case, I have an alfresco username/ClientConfiguration map "Map<String,ClientConfiguration>" and I want to invoke the rest api's "getNode" method with the user name XXX.
1) Retrieve the "ClientConfiguration" from the map with the specific key "XXX": tickets.get("XXX")
2) Prepare the component to use the service "nodesApi.getNode()" with the specific "ClientConfiguration"
My questions are:
1) How to create a client configuration runtime from java code ? The current client configuration is created with spring annotations that retrieve values from the "applications.properties" file.
2) Once I have solved step 1 ) and created the java object "ClientConfiguration" associated with a specific user "XXX" how do I use it to set the services (NodesApi, etc.) to use that user ?
Explore our Alfresco products with the links below. Use labels to filter content by product module.