public class Secured extends Action.Simple {
public F.Promise<SimpleResult> call(Http.Context ctx) throws Throwable {
if(ctx.request().cookie("username") == null) return F.Promise.pure(badRequest("You need to log in."));
return delegate.call(ctx);
}--
You received this message because you are subscribed to a topic in the Google Groups "play-framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/8xdABaEwryE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.