Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Read query parameter from URL in doFilter

DivyaTyagi
Level 2
Level 2

Hi,

 

We have integrated AEM apps with Okta and to resolve one the issue when user got access at Okta but not in AEM due to saml connection between AEM and Okta. We added parameter in URL when user is redirecting from other application (outside from AEM) and trying to read the parameter in doFilter at Access Check Filter but it is returning null values at doFilter.

 

Anyone can let me know is there any way to read those parameter preferable without wrapper. Also, we tried to read via sling request and http request.

 

String queryString = ((HttpServletRequest) request).getQueryString();  --> null

request.getParameter("request_access") --> null

String queryParameter = slingRequest.getQueryString(); --> null

slingRequest.getParameter("request_access") --> null

1 Accepted Solution
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @DivyaTyagi,

With Sling filter scope set to request, I am able to get the queryString via slingRequest.getQueryString()

Cross check 

  • the filter properties
  • Outside this use case of checking the URL that is redirected from other application, check with any of the sites pages itself (with some queryString) to narrow down the cause. 

View solution in original post

1 Reply
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @DivyaTyagi,

With Sling filter scope set to request, I am able to get the queryString via slingRequest.getQueryString()

Cross check 

  • the filter properties
  • Outside this use case of checking the URL that is redirected from other application, check with any of the sites pages itself (with some queryString) to narrow down the cause. 

View solution in original post