Making authenticated requests to Liferay 7.2
Making authenticated requests to Liferay 7.2 Overview This article will describe how to make authenticated requests in Liferay 7.2 with Basic Authentication. Configuration First of all, you need to enable "Auto Login Basic Authentication Header". Go to Control Panel -> Configuration -> System Settings > API Authentication . Check the ' Enabled ' flag: Making the request Let's say, you have some restricted document in Documents and Media, with the URL: http://localhost:8080/documents/20123/35301/Liferay+DXP+7.2+Datasheet.pdf/4f069157-d409-577e-eda5-cf46b131b9cf You can't access this link being not logged in, because it does not have View permissions for Guest. So, you need to access this URL being logged in. For this you need to send HTTP Authorization header. Command with basic authorization: curl -H "Authorization: Basic [auth-string]" [url] , where auth-string is encoded email:password pair. To obtain...