Package ninja
Class SecureFilter
- java.lang.Object
-
- ninja.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
-
-
Constructor Summary
Constructors Constructor Description SecureFilter(Ninja ninja)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Result
filter(FilterChain chain, Context context)
Filter the request.
-
-
-
Field Detail
-
USERNAME
public static final String USERNAME
If a username is saved we assume the session is valid- See Also:
- Constant Field Values
-
-
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.
-
-