Package ninja

Class SecureFilter

  • All Implemented Interfaces:
    Filter

    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 :)
    Author:
    rbauer
    • Field Detail

    • Constructor Detail

      • SecureFilter

        @Inject
        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
        Parameters:
        chain - The filter chain
        context - The context