Alfresco JS API Authentication Options

cancel
Showing results for 
Search instead for 
Did you mean: 
chao
Partner

Alfresco JS API Authentication Options

Is there another option for ECM/BPM authentication without using username and password in the Alfresco Javascript API? Assuming the user is already authenticated through external identity access management system, is there API endpoint to retrieve API token for both ECM and BPM?

9 Replies
eugenio_romano
Alfresco Employee

Re: Alfresco JS API Authentication Options

If you are already auth you can just get the instance and perform the calls

chao
Partner

Re: Alfresco JS API Authentication Options

Thanks for the reply. What I mean is the user is authenticated for the ADF web application, but not authenticated to ECM/BPM.

eugenio_romano
Alfresco Employee

Re: Alfresco JS API Authentication Options

Sorry, is not clear to me the difference. The only authentication that ADF can perform is the one against BPM and ECM or both.

chao
Partner

Re: Alfresco JS API Authentication Options

Let's say the ADF web app is protected by IAM, a user logins through external custom interface, then redirected back to the ADF home. How does ADF in this case authenticate against ECM/BPM REST API without using username and password?  

dvuika
Alfresco Employee

Re: Alfresco JS API Authentication Options

JS-API uses basic auth to get the tokens for ACS and APS, and then uses tokens for subsequent calls. If you use external interface you still need a token to talk to ACS and APS. Both "ecmAuth" and "bpmAuth" from JS-API feature a method called "setTicket" that allows assigning a ticket from the outside: alfresco-js-api/ecmAuth.js at master · Alfresco/alfresco-js-api · GitHub 

Hope that helps.

chao
Partner

Re: Alfresco JS API Authentication Options

Thanks Denys, that's helpful.

What kind of token (like JWT?) that ACS/APS can recognize? Is there custom code I need to develop from ACS/APS perspective? or just some configuration. 

dvuika
Alfresco Employee

Re: Alfresco JS API Authentication Options

JS-API just triggers public APS/ACS api, you can refer to the following links for more details on the api:

APS: https://activiti.alfresco.com/activiti-app/api-explorer.html

ACS: https://api-explorer.alfresco.com/api-explorer/

dvuika
Alfresco Employee

Re: Alfresco JS API Authentication Options

You can also read the docs for the JS-API, there are examples for using tickets: https://github.com/Alfresco/alfresco-js-api#login-with-ticket

chao
Partner

Re: Alfresco JS API Authentication Options

Thanks, but I don't know what's the valid ticket to set. I may have the userid or some kind of token from the IDM, such as CA Siteminder.