I was following the steps in the below article.
Creating your application with ADF
I have configured only Alfresco content services. The configuration is something like this.
When I enter username and password and click login, below error is thrown,
[HPM] Error occurred while trying to proxy request /alfresco/api/-default-/publi
c/authentication/versions/1/tickets from localhost:4200 to https://<<hostname>>/share (SELF_SIGNED_CERT_IN_CHAIN) (https://nodejs.org/api/errors.h
When i change secure to false, it shows you've entered unknown username and password and no error is logged in the console. Kindly suggest the right configuration to connect to a secured alfresco platform.
Solved! Go to Solution.
If I understood well, you are trying ADF against Alfresco Content Service only, and your log indicates your ADF application is trying to log in against Activiti.
If you intent to use only Alfresco, and not Activiti, you have to change your adf-login component configuration, something like:
You can check the component properties at alfresco-ng2-components/login.component.md at master · Alfresco/alfresco-ng2-components · GitHub
For development purposes, I would suggest using HTTP and configuring HTTPS for production, where you are using a proper server instead of the webpack dev server coming with angular CLI.
As for the proxy, you can refer to the following article: stories proxy · angular/angular-cli Wiki · GitHub
Under the hood it is using the webpack server that might require some additional configuration: https://webpack.js.org/configuration/dev-server/#devserver-https
From quick googling: angular-cli server - how to proxy API requests to another server? - Stack Overflow
I don't have alfresco installed in my system hence i am using the alfresco running in the Dev server. We used to login to dev alfresco using the url - https://<<hostname>>/share
So i have mentioned the configuration as below,
Login never succeed. It always show error as unknown username and password and the here is the console log.
[HPM] POST /alfresco/api/-default-/public/authentication/versions/1/tickets ->
Don't know how to proceed.
What exactly happens when we hit sign in in the login component? As per the above configuration, does it makes a call to https://<<hostname>>/share?
Isn't the right configuration something like this?
Without the /share in the target parameter?
As Douglas said you need to remove share from the address plus can you please tell us which version of alfresco content service is running on your server? Please note that ADF works only with the Content service API >= 5.2.0
Thanks for the reply.
I already tried with /target and without that as well. It does not work.
Yes we are using alfresco 5.2
if you could attach a screenshot of your console and network maybe that can help us in order to debug your local problem. Did you start your project using the generator?
Here are some of the screenshots. Started the app using npm start.
Tried to login
Console after hit sign in
I observe that the log only shows subscribed to HTTP events. What about HTTPS
I gave the links for SSL and Angular CLI at the beginning. Did you have a chance to investigate?
Discussions, help and advice about the Alfresco Development Framework.