Read query parameter from URL in doFilter | Adobe Higher Education
Skip to main content
Level 2
December 16, 2021
해결됨

Read query parameter from URL in doFilter

  • December 16, 2021
  • 1 답변
  • 879 조회

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

이 주제는 답변이 닫혔습니다.
최고의 답변: Vijayalakshmi_S

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. 

1 답변

Vijayalakshmi_S
Level 10
December 16, 2021

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.