/** * Check that the token submitted from a form is valid. * * @see play.templates.FastTags#_authenticityToken */ protected static void checkAuthenticity() { if (Scope.Params.current().get("authenticityToken") == null || !Scope.Params.current().get("authenticityToken").equals(Scope.Session.current().getAuthenticityToken())) { forbidden("Bad authenticity token"); } }