401 Unauthorized - Alfresco APIs

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

401 Unauthorized - Alfresco APIs

Jump to solution

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 Solution

Accepted Solutions
renatoc1
Active Member II

Re: 401 Unauthorized - Alfresco APIs

Jump to solution

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

View solution in original post

2 Replies
renatoc1
Active Member II

Re: 401 Unauthorized - Alfresco APIs

Jump to solution

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
Active Member II

Re: 401 Unauthorized - Alfresco APIs

Jump to solution

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