AutoLoginFilter Import Failed in Class fileAutoLoginFilter Import Failed in Class filehttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1217753752024-03-28T20:19:28Z2024-03-28T20:19:28ZRE: AutoLoginFilter Import Failed in Class fileOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1217765422023-05-11T07:09:26Z2023-05-11T07:09:25Z<p>AutoLoginFilter is packaged in portal-impl, which is not exported -
thus you can't have external modules depend on it.</p>
<p>That being said, you can just add another filter that is completely
independent of AutoLoginFilter and do the additional work there - you
don't need to depend on that component just to provide more data to
the session. Your filters have a declarable order (as you're already
using in your sample), so you can pick where your filter should be in
the chain - before or after the original AutoLoginFilter.</p>Olaf Kock2023-05-11T07:09:25ZAutoLoginFilter Import Failed in Class fileAnish Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1217753742023-05-10T14:18:54Z2023-05-10T10:06:12Z<p>I am trying to override the implementation of
<strong>com.liferay.portal.security.sso.openid.connect.internal.servlet.filter.auto.login.OpenIdConnectAutoLoginFilter</strong>
to set some additional session data to the session before granting the
authentication. For this while I am creating my own filter which
extends
<strong>com.liferay.portal.servlet.filters.autologin.AutoLoginFilter</strong> the
eclipse showing class not found in the import statement.</p>
<p>Below is the Custom Filter class I am trying to create.
The <strong>import
com.liferay.portal.servlet.filters.autologin.AutoLoginFilter; </strong> shows
could not resolve;</p>
<pre>
<code class="language-java">import com.liferay.portal.servlet.filters.autologin.AutoLoginFilter;
import javax.servlet.Filter;
import org.osgi.service.component.annotations.Component;
import com.liferay.portal.security.sso.openid.connect.constants.OpenIdConnectConstants;
@Component(
configurationPid = "com.liferay.portal.security.sso.openid.connect.configuration.OpenIdConnectConfiguration",
property = {
"after-filter=Virtual Host Filter", "servlet-context-name=",
"servlet-filter-name=SSO OpenId Connect Auto Login Filter",
"url-pattern=" + OpenIdConnectConstants.REDIRECT_URL_PATTERN
},
service = {Filter.class}
)
public class CustomOpenIdConnectAutoLoginFilter extends AutoLoginFilter {
}</code></pre>
<p>Below is the present gradle.build file</p>
<pre>
<code class="language-javascript">dependencies {
compileOnly group: "com.liferay.portal", name: "release.portal.api"
cssBuilder group: "com.liferay", name: "com.liferay.css.builder", version: "3.1.0"
compileOnly group: "com.liferay", name: "com.liferay.portal.security.sso.openid.connect.impl", version: "7.0.21"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "3.0.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
}</code></pre>
<p>Do I need to add any gradle dependancy to get this class in my
portlet module.<br> Let me