Tag: filter

New feature in DAS in OpenAM 9.5.1RC2

Sometimes there is a need, when you need to add an additional filter for the Distributed Authentication User Interface. For example if you want to set some extra request parameters, or just want to add/filter out some response HTTP headers, anything that fits your needs. The problem with this is, that you can not configure your webapplication to run the Filter init methods always in the exact same order, because this is not covered by the EE specs, you can only control the filter order for doFilter. When your custom filters initialization depends on the DAS filter, then OPENAM-229 comes into the picture.
The fix for this issue was to move the initialization code to a helper class, which can take care of initialization for everyone. So if you have an own filter you only have to put the following snippet at the beginning of your init:

if (!DistAuthConfiguratorFilter.isConfigured) {
    DistAuthConfiguratorFilter.isConfigured = 
            DistAuthConfiguratorHelper.initialiseDistAuth(
            filterConfig.getServletContext());
}

And off you go, now the initialization order wouldn’t matter anymore, since the DistAuth will be always init’d first.