Login in alfresco with java class

cancel
Showing results for 
Search instead for 
Did you mean: 
natmacri
Active Member II

Login in alfresco with java class

Goodmorning everyone,
I am integrating Alfresco into my software where I would like to log in using a backend class in java so that the user does not have to enter the credentials in the login form twice.
Currently I can log in using a REST call http://myip:myport/alfresco/service/api/login?u=myuser&pw=mypassword obtaining 200 OK and the associated ticket in response.
In the window of my software I should be able to view the dashboard of Alfresco but despite being logged in, it proposes the login form and the insertion of credentials. The url  is as follows:
http://myip:myport/share/page/user/admin/dashboard?ticket="+ticket

Thanks in advance.

1 Reply
angelborroy
Alfresco Employee

Re: Login in alfresco with java class

Alfresco Repository (alfresco.war) provides a REST API for authentication, while Share Web App (share.war) is using its own authentication system. If you want to use Share Dashboard, you have to extend Share Authentication. Probably SSO is a good approach: Configuring Alfresco Share to use an external SSO | Alfresco Documentation 

Hyland Developer Evangelist