Hi Alberto,
I meant something more like:
public class SpnegoHttpFilterWrapper extends AbstractMgnlFilter{
protected SpnegoHttpFilter wrappedFilter = null;
public void init(FilterConfig config){
super.init(config);
this.wrappedFilter = new SpnegoHttpFilter();
this.wrappedFilter.init(config);
}
public void doFilter(HttpServletRequest request, HttpServletResponse
response, FilterChain chain) throws IOException, ServletException {
wrappedFilter.doFilter(request, response, chain);
}
public void destroy(){
if (wrappedFilter!=null)
wrappedFilter.destroy();
wrappedFilter = null;
}
}
So yes, you need to add the init() and destroy() methods to your wrapping
filter implementation.
Note, I wrote this code directly in the email so there may be some typos...
Regards from Vienna,
Richard
> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:user-list-owner@magnolia-
> cms.com] Im Auftrag von Alberto Giovannone (via Magnolia Forums)
> Gesendet: Freitag, 09. Mai 2014 11:30
> An: Magnolia User List
> Betreff: [magnolia-user] Re: Problem with Windows Integrated
> Authentication and Magnolia Authentication
>
> Hi Richard,
> first of all thank you for your help. I tried to apply your suggest and now my
> new code of SpnegoFilter is :
> public class XXXSpnegoHttpFilter extends AbstractMgnlFilter{
>
> public void doFilter(HttpServletRequest request,
> HttpServletResponse response, FilterChain chain) throws IOException,
> ServletException {
>
> XXXHttpFilter filter = new SpnegoHttpFilter();
> filter.init(new XXXFilterConfig());
> filter.doFilter(request, response, chain);
> [b]filter.destroy();[/b]
> }
>
> }
>
> I added filter.destroy(). At the end I had the same Session Expired error.I
> don't understand when you say "not be reinitialiazing the SpNegoFilter" and
> "reuse that instance for each request". I inizialize SpnegoFilter only in the
> code you can see above in my SpnegoFilter configured in Magnolia just
> before the Login Filter.
> Maybe Must I add filter.init() and filter.destroy in others filters such as
> Login
> one? I tried to put this code in my Login filter managing both init and
> destroy
> methods but the result is the same. Really I don't understand in which other
> places I have to put the SpngeoFilter init and destroy.
>
> Could you help me please?
>
> Thank you in advance
>
> Regards from Milan
>
> Alberto Giovannone
>
> --
> Context is everything: http://forum.magnolia-
> cms.com/forum/thread.html?threadId=be26f4c1-1b80-42bc-8de0-
> c51be72a9127
>
>
> ----------------------------------------------------------------
> For list details, see http://www.magnolia-cms.com/community/mailing-
> lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------