It's possible to allow Authorization Bearer token in alfresco requests? how can I do that?
When I try to reach any endpoint, ex: curl --header "Authorization: Bearer xxx.xxxx" http://localhost/alfresco/s/... I get this error:
"status" :
{
"code" : 401,
"name" : "Unauthorized",
"description" : "The request requires HTTP authentication."
},
"message" : "05170011 Authorization 'Bearer' not supported.",
"exception" : "",
"callstack" : [ ],
"server" : "Community v6.0.7 (r2ba893dd-b113) schema 10,201",
"time" : "Jun 17, 2019 1:20:03 PM"
Thanks.
Hi T Dias,
To me this means your clients requests land on the alfresco servlet container with an HTTP "Authorization" header of type "Bearer".
This type is not recognized by Alfresco out-of-the-box, hence the message.
You may have this authentication type set either by your client or by a reverse proxy in between?
Maybe can you clarify how you installed Alfresco and how is it integrated with other services?
Regards,
Hi Alexandre Chapellon,
Thanks for your answer.
I found that you added a topic about "Collaborative Edition on Alfresco using LibreOffice Online", that is more or less what I'm trying to accomplish.
The problem that I found is that libreoffice add an Authorization header of type bearer in the request send to alfresco.
My environment:
Any idea about this?
Regards
Have you found a solution?
Hello,
Instaed Bearer you should use the alf_ticket param in your curl call. First thing you do is call the login web script to get a ticket.
curl -v "http://localhost:8080/alfresco/service/api/login?u=admin&pw=yourpassword"
Alfresco will respond with something like:
TICKET_e46107058fdd2760441b44481a22e7498e7ddfsf
Now you can take that ticket and append it to your subsequent web script calls.
Then post it to the web script using curl, like this:
curl -v -X POST "http://localhost:8080/alfresco/service/someco/someScript?alf_ticket=TICKET_e46107058fdd2760441b44481a22e7498e7dbf66" -H "Content-Type: application/json" -d @/Users/arjunm/test.json
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.