Skip to content

Commit 1ec03c0

Browse files
MirnaGamabrianchandotcom
authored andcommitted
LPS-203432 Add default filter properties
1 parent 7477a0a commit 1ec03c0

File tree

1 file changed

+19
-0
lines changed
  • modules/apps/portal-security/portal-security-auth-verifier/src/main/java/com/liferay/portal/security/auth/verifier/internal/tracker

1 file changed

+19
-0
lines changed

modules/apps/portal-security/portal-security-auth-verifier/src/main/java/com/liferay/portal/security/auth/verifier/internal/tracker/AuthVerifierFilterTracker.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,22 @@ public void removedService(
313313
remoteAccessFilterServiceRegistration.unregister();
314314
}
315315

316+
private Dictionary<String, Object> _buildDefaultFilterProperties(
317+
String filterName) {
318+
319+
HashMapDictionaryBuilder.HashMapDictionaryWrapper<String, Object>
320+
properties =
321+
new HashMapDictionaryBuilder.HashMapDictionaryWrapper<>();
322+
323+
properties.put("servlet-context-name", "");
324+
properties.put("servlet-filter-name", filterName);
325+
properties.put("url-pattern", "/o/headless-delivery/*");
326+
properties.put(
327+
"dispatcher", new String[] {"FORWARD", "INCLUDE", "REQUEST"});
328+
329+
return properties.build();
330+
}
331+
316332
private Dictionary<String, Object> _buildPropertiesForAuditFilter(
317333
ServiceReference<ServletContextHelper> serviceReference) {
318334

@@ -369,6 +385,9 @@ private Dictionary<String, Object> _buildPropertiesForAuditFilter(
369385
_defaultRemoteAccessFilterServiceRanking);
370386
}
371387

388+
properties.putAll(
389+
_buildDefaultFilterProperties("Remote Access Filter"));
390+
372391
return properties.build();
373392
}
374393

0 commit comments

Comments
 (0)