Package ninja

Class SecureFilter

  • All Implemented Interfaces:

    public class SecureFilter
    extends Object
    implements Filter
    A simple default implementation of a SecureFilter. If you annotate your methods using that filter it will check if a variable called "username" is saved in the cookie. If yes it will continue the execution. If not it will break. NinjaFilter are really simple. If this one does not suit your needs modify it for your project :)
    • Field Detail

    • Constructor Detail

      • SecureFilter

        public SecureFilter​(Ninja ninja)
    • Method Detail

      • filter

        public Result filter​(FilterChain chain,
                             Context context)
        Description copied from interface: Filter
        Filter the request. Filters should invoke the filterChain.nextFilter() method if they wish the request to proceed.
        Specified by:
        filter in interface Filter
        chain - The filter chain
        context - The context