Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
A plugin that acts as a web filter, and intercepts the HTTP request, while doing some pre-processing & post-processing to the response.
Common use cases:
Setting response headers.
URL redirection.
Content encryption.
Custom authentication.
org.joget.plugin.base.PluginWebFilter
Its extends the javax.servlet.Filter
and org.joget.plugin.base.ActivationAwarePlugin
.
Exactly the same implementation as a Filter.
Execute based on the provided URL patterns.
URL Patterns follow the AntPathMatcher
syntax, which is widely used in the Spring Framework.
String getName()
Method returning the name of the filter.
String[] getUrlPatterns()
boolean isPositionAfterSecurityFilter()
A flag to make the filter execute after the security chain. If after that, you can get the logged-in user.
int getOrder()
The order of plugin web filter execution.
void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
The filter logic implementation.
org.joget.apps.app.model.PluginWebFilterAbstract
Extended ExtDefaultPlugin
and implemented PluginWebFilter
.
Auto register/unregister the filter using PluginWebFilterUtil
.
void afterRegister()
Auto calling PluginWebFilterUtil.registerFilter
to register the filter when installed.
void beforeUnregister()
Auto calling PluginWebFilterUtil.unregisterFilter
to unregister the filter when uninstalling.
boolean isPositionAfterSecurityFilter()
Default to return true.
int getOrder()
Default to return 0.
Add a header to the response of /web/login
.
Run before the security chain and order after SampleLoginFormEncryption
, even if it registers before it.
Intercept /web/login
request and auto-login as Admin when the saved URL is the assignment link. Then, it directs to the configured redirect URL or home.
Intercept the /web/login
to inject a script to encrypt the login credentials before the body end tag.
Intercept /j_spring_security_check
to decrypt the credentials before passing to the security chain.
Run before the security chain.
Intercept all URLs with /**
to authenticate with a JWT token.
Run before the security chain.