This AuthcheckerServlet servlet receives only HEAD requests from the render, so you only need to implement the doHead method.
The render includes the URI of the requested resource as a parameter of the HTTP request. For example, an authorization servlet is accessed via /bin/permissioncheck. To perform a security check on the /content/geometrixx-outdoors/en.html page, the render includes the following URL in the HTTP request:
Thanks for your reply. I am already using one servlet for permission check. Before checking the page permission, I want o get requested page query string as well. How can we send a url including query string to that servlet?
Permission check servlet uses request.getParameter("uri"). Here is uri is path of the requested page but it's taking it's query string.
How to get /bin/permissioncheck?uri=/content/geometrixx-outdoors/en.html?intcmp=true.
As of we are getting only /bin/permissioncheck?uri=/content/geometrixx-outdoors/en.html.
Is this query string relevant to make a decision if this user is allowed to access that resource? Is there a case, that with “?intcmp=true" the user is allowed to access the resource and with any other not? If a user has read access to a resource he can access that resource.
So if you use the resource-based approach of AEM in the right way, you should never come into that situation where this query string is required to determine if read access should be allowed. And then adding the query string of the request to the request to the authchecker is not required at all.