Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: RE: Manage 401 error utility page
This is a feature request, it would be great to have an utility page for 401 errors.
Eric.
Feature Request Created: https://liferay.atlassian.net/browse/LPD-39421
Hi Eric,
Could you please give me the context? What is the exact use case when you would need it?
Thank you,
Zsigmond
Hi,
I ask for 401 but why not 403 or all other errors.
In our case, we are using remoteApps and they can redirect to a wrong page or an unauthorized ressource.
Eric.
Hi Eric,
So your remote app redirects the user to a Liferay portal page after a remote call and that throws a 401 or 403, right? It's not about the response to the remote call, right? Is my understanding correct?
If so however, I was just thinking in what circumstances does the portal give a 401 or 403? Could you please describe how exactly you can get such errors? It would help to define the clear use case.
Thank you,
Zsigmond
Hi,
Yes it is one case.
A user can access to a detail page from the remote app but he can switch between 2 remote apps or go to the page with a link or change manually the url with a wrong id.
The webservice can answer 200, 204, 401, 403... for us 404 is the page does not exist and we prefer to know the real problem... May be the user have a 401 but it is because we have miss a configuration.
Our users are not guests, they are authentificated so we trust them... we have to know what is their real problem.
Of course we can create a 401, 403... response in each remote apps but for us Utility Pages are a better and native solution.
It is more flexible to change a master page than to redeploy all of our remote apps.
Eric.
Hi Eric,
So do the users use a remote app which redirects them to a page in the Liferay portal? Or does the app render the portal pages for them?
Sorry, but it is still not clear how the Utility Pages are involved. I guess, the remote app makes remote (Headless) API calls and processes the requests. For such requests the (Headless) API framework sends HTTP codes back that the remote app can interpret and do whatever it wants to do with them. At this step Utility Pages cannot help.
Utility Pages can operate when the user accesses some portal page or resource in a client which shows a portal page as a result. In the case of 404 or 500 HTTP errors, it can respond with an error specific Utility Page indeed, but generally it is not a case for remote apps. If it is in your case, could you please describe with a step by step, how it happens?
On the other hand, when a user is interacting with portal resources, pages in a browser and there is an authentication or authorization failure, the response is generally a 404 because of security reasons. It is intended in the portal not to give too much info about that if there is an authentication or authorization failure because it may potentially open a security flaw.
However, I may still be mistaken at understanding your case so please share more details if you think this is that case.
Regards,
Zsigmond
Powered by Liferay™