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
Field Summary |
String |
USERNAME
If a username is saved we assume the session is valid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USERNAME
public final String USERNAME
- If a username is saved we assume the session is valid
- See Also:
- Constant Field Values
SecureFilter
public SecureFilter()
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 chaincontext
- The context
Copyright © 2012. All Rights Reserved.