cancel
Showing results for 
Search instead for 
Did you mean: 

401 Unauthorized - Alfresco APIs

renatoc1
Confirmed Champ
Confirmed Champ

I created an API that will consume Alfresco APIs. For example, i'm trying to consume the endpoint localhost:8081/test
with Basic Auth (admin/admin) that will consume the endpoint http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/audit-applications by feign client, but it's returning 401 - Unauthorized.

1 ACCEPTED ANSWER

renatoc1
Confirmed Champ
Confirmed Champ

Ok, after many hours thinking... i forgot to exclude SecurityAutoConfiguration.class. Haha

View answer in original post

2 REPLIES 2

renatoc1
Confirmed Champ
Confirmed Champ

For more details, i'm using these properties on my application.properties.

# HTTP Basic Authentication that will be used by the API
content.service.security.basicAuth.username=admin
content.service.security.basicAuth.password=admin
# Location of the server and API endpoints
content.service.url=http://localhost:8080
content.service.path=/alfresco/api/-default-/public/alfresco/versions/1
search.service.path=/alfresco/api/-default-/public/search/versions/1

But it's not working.

When i access the endpoint of my application (http://localhost:8081/test) to consume Alfresco APIs internally, i get 401 - Unauthorized.

renatoc1
Confirmed Champ
Confirmed Champ

Ok, after many hours thinking... i forgot to exclude SecurityAutoConfiguration.class. Haha