cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication from Java Rest APi extension project

ChrisA
Champ in-the-making
Champ in-the-making

I've created a java ResT API extension project. I can access and update alfresco via this project. 
This java Rest API extension project is used in a GUI client application. In this GUI client application a user logs in with his/her own credentials.
Calls via the java api wrapper are using the credentials from the application.properties file. Is it possible to call the java api wrapper as the logged in user?
For example when a user uploads a file, now the created user in Alfresco is the user mentioned in the application.properties file. But it would be nice if the file is created as the logged in user from the GUI.
Alfresco and the GUI client project can authenticate users from AD.

1 REPLY 1

christopher356
Champ in-the-making
Champ in-the-making

@ChrisA wrote:

I've created a java ResT API extension project. I can access and update alfresco via this project. 
This java Rest API extension project is used in a GUI client application. In this GUI client application a user logs in with his/her own credentials.
Calls via the java api wrapper are using the credentials from the application.properties file. Is it possible to call the java api wrapper as the logged in user?
For example when a user uploads a file, now the created user in Alfresco is the user mentioned in the application.properties file. But it would be nice if the file is created as the logged in user from the GUI.
Alfresco and the GUI client project can authenticate users from AD.


To call the Java API wrapper as the logged-in user, capture their credentials from the GUI client application. Pass these credentials to the API wrapper when making calls to Alfresco. Consider using Alfresco's impersonation feature or custom authentication mechanisms to associate the logged-in user with API calls. This will ensure that file uploads and other actions are attributed to the correct user in Alfresco.